@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
===========
step1. create a class: viewcontroller3.h, viewcontroller3.m
step2. create a xib file : c3.xib
step3. for c3.xib panel, click file owner
(a) indentity inspector: class fill: viewcontroller3
(b) connection inspector : outlets: connect manual with nib.
step4. for the caller to initialise a vc3:
ViewController2* vc3 = [[ViewController3 alloc] initWithNibName:@"vc3" bundle:nil]
Especially for vc3, if the nib file name is the same as class name, i.e, "viewcontroller3.nib", we can simply write as below
ViewController2* vc3 = [[ViewController3 alloc] init]
;
=====================
step1. create a class: viewcontroller3.h, viewcontroller3.m
step2. create a xib file : c3.xib
step 3. override the load view() in viewcontroller3.m
NSArray* ary = [[NSBundle mainBundle] loadNibNamed:@"vc3" owner:self options:nil];
if (ary)
{
UIView* v=ary[0];
v.frame = CGRectMake(30, 30, 100, 100);
[self.view addSubview:v];
}
Step4. caller
ViewController* vc3 = [ViewController alloc]init];
** no need to set the owner and outlet !!!
=======================