ios - Issue with storyboard -
i want use storyboard in old project (which implemented using xibs) adding new features.
i have created storyboard file , added view controller , in identity inspector have specified class name view controller.
@implementation appdelegate - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { // override point customization after application launch. uinavigationcontroller *navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:[[firstviewcontroller alloc]initwithnibname:@"firstviewcontroller" bundle:[nsbundle mainbundle]]]; self.window.rootviewcontroller = navcontroller; [self.window makekeyandvisible]; return yes } @end
in firstviewcontroller when click on button call gotosomeviewcontroller method pushes eventslistviewcontroller loading eventsscreen storyboard
@implementation firstviewcontroller
-(void)gotosomeviewcontroller { eventslistviewcontroller *vc = [[uistoryboard storyboardwithname:@"eventsscreen" bundle:nil] instantiateinitialviewcontroller];
[controller pushviewcontroller:vc animated:yes]; }
@end
when i'm running application eventslistviewcontroller showing empty screen without views have added in storyboard.
based on information supplied there should no reason why mix nibs , storyboard.
i setup storyboard. remove app delegate code , setup project load storyboard specific device.
setup storyboard have initial view controller uinavigationcontroller
has firstviewcontroller
root of that.
then can drag secondviewcontroller
button , select push move option. remove method gotoviewcontroller. there no reason why have setup this...
Comments
Post a Comment