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
,homeviewcontroller
each .xib file - the problem want separate each logical code @ each controller addsubview
mainstoryboard
exp:loginviewcontroller.xib
logical @loginviewcontroller.swift
there want gothomeviewcontroller
when 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