i think many developer have tried this, how make mainstoryboard load many uiviewcontroller xib or use nib method, there explaination :
- i have 1
mainstoryboard, connected class viewcontroller useuiviewcontroller - i have
loginviewcontroller,homeviewcontrollereach .xib file - the problem want separate each logical code @ each controller addsubview
mainstoryboardexp:loginviewcontroller.xiblogical @loginviewcontroller.swiftthere want gothomeviewcontrollerwhen loged in ...can solve that's problem ?
you need override initwithcoder method in object-c class.
if ((self = [super initwithcoder:adecoder])) { [self addsubview:[[[nsbundle mainbundle] loadnibnamed:@"myview" owner:self options:nil] objectatindex:0]]; } return self; } for more detail follow link
Comments
Post a Comment