Graphics Programs Reference
In-Depth Information
Creating a Custom View
To create a custom view, you subclass UIView and customize that subclass's image.
Create a new iOS Objective-C class ( Figure 6.5 ).
Figure 6.5 Creating a new class
On the second pane of the assistant, choose NSObject as a superclass and name the class
HypnosisView . Click Create on the sheet that drops down. Then, open Hypnos-
isView.h in the editor area. Change HypnosisView 's superclass from NSObject to
UIView .
@interface HypnosisView : NSObject
@interface HypnosisView : UIView
You now have a UIView subclass.
 
Search WWH ::




Custom Search