ios - performSegueWithIdentifier:sender not working on device -
i have storyboard has viewcontroller defaultviewcontroller
neither uitabbarcontroller
nor 'uinavigationcontroller`. decides whether upcoming controller should registration screen or home screen.
i have 2 segues originating it, 1 pointing uinavigationcontroller' registration while other moves 'uitabbarcontroller
default home screen.
the defaultviewcontroller
calls next in viewdidappear:
method
nsstring *thecontroller = nil; if ([appstate sharedappstate].currentuserstate == registered) { thecontroller = @"homesegue"; } else { thecontroller = @"regsegue"; } [self performseguewithidentifier:thecontroller sender:self];
the segue performed on ios simulator 5.1.1 6.0. however, nil happens when run code on iphone ios 5.1.1 or iphone ios 6.0. view stays defaultviewcontroller
s view.
edit created whole new project , works fine there when copied old storyboard contents , classes, issue re-appears.. !!
** edit 2 ** removed rootviewcontroller associated uinavigationcontroller , added simple uiviewcontroller label on , works fine. if add together custom registrationcontroller root controller, segue not performed.
p.s. custom registrationcontroller
adds controller childviewcontroller in it.
strange .. very strage.. how got work.
the registrationcontroller
part of navigationcontroller, created instance of reginfocontroller
added both it's subview kid controller.
i overrid awakefromnib
method of childcontroller , started working.
to confirm scenario, removed method , stopped working..
ios objective-c storyboard segue
No comments:
Post a Comment