ios - View Controller With two different XIB's..Tricky -


i have tricky question here..please help..

i have 1 viewcontroller called "demoviewcontroller" 2 different xib's (demo1controller.xib & demo2controller.xib) linked demoviewcontroller, load xib based upon condition..

i have navigation controller implemented in appdelegate, pushing view controller(demoviewcontroller) xib demo1controller, when user taps button in demo1controller, need load same viewcontroller i.e, demoviewcontroller xib demo2controller..

can possible?? or need maintain different classes 2 xib's

let me know if have questions...

as viewcontroller object other object can stack many of them need on top of each other. creating many instances of object want.

when instantiate them can do:

uiviewcontroller *viewcontroller = [[demoviewcontroller alloc] initwithnibname:@"demo1controller" bundle:nil]; 

or

uiviewcontroller *viewcontroller = [[demoviewcontroller alloc] initwithnibname:@"demo2controller" bundle:nil]; 

as long iboutlets , delegate set correctly on both .xib's , set using same custom class in ib. (third icon left in inspector panel, @ top.) if fail set them crash on build , run.

and can check out similar question answered different approach time ago. another approach


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -