How to create a Custom UIView and How to instantiate that ?
In Flash, all we need to do is create a MovieClip and assign it a class name in the library.
Instantiation is a simple matter of:
At this current point in time, my understanding of creating custom UIView in xcode is limited to the understanding that you have to:
1: Forward declare the class in the header.
2:
in @interface's {}
and THEN
in the header file also.
3: Nib initialization in the implementation file in viewDidLoad and do "addSubview".
==============================
Based on my limited understanding at this point, I find the need to
at the header somewhat limiting...as it denotes you must know how many instance you will create in the application before hand.
I believe I am wrong here, hence, my question is, how do I add custom UIViews with initialization codes in real time ?
In Flash, all we need to do is create a MovieClip and assign it a class name in the library.
Instantiation is a simple matter of:
Code:
var newclass:CustomClass = new CustomClass({initialization_data:1652});
addChild(newclass);
At this current point in time, my understanding of creating custom UIView in xcode is limited to the understanding that you have to:
1: Forward declare the class in the header.
2:
Code:
newclass *CustomClass
and THEN
Code:
@property (nonatomic, retain) newclass *CustomClass;
3: Nib initialization in the implementation file in viewDidLoad and do "addSubview".
==============================
Based on my limited understanding at this point, I find the need to
Code:
@property (nonatomic, retain) newclass *CustomClass;
I believe I am wrong here, hence, my question is, how do I add custom UIViews with initialization codes in real time ?