ios - How can I load storyboard programmatically from class? -
my problem looking way use both storyboard , xib. can't find proper way load , show storyboard programmatically. project started developing xib, , it's hard nest xib files in storyboard. looking way in code, alloc, init, push
viewcontrollers. in case have 1 controller in storyboard: uitableviewcontroller
, has static cells content want show. if knows proper way work both xib , storyboard without huge refactoring, appreciate help.
in storyboard go attributes inspector , set view controller's identifier. can present view controller using following code.
uistoryboard *sb = [uistoryboard storyboardwithname:@"mainstoryboard" bundle:nil]; uiviewcontroller *vc = [sb instantiateviewcontrollerwithidentifier:@"myviewcontroller"]; vc.modaltransitionstyle = uimodaltransitionstylefliphorizontal; [self presentviewcontroller:vc animated:yes completion:null];
Comments
Post a Comment