objective c - navigationController popToRootViewControllerAnimated not working in iOS 8 -


i have login uiviewcontroller embedded in uinavigationcontroller user enters userid/password clicks [login] button looks this:

2-textfields , uibutton, when user clicks button run code:

    -(void)btlogintapped:(id)sender{ [dologin]; nslog(@"login successful.") [self.navigationcontroller poptorootviewcontrolleranimated:yes]; } 

now problem arises when use simulator or device ios 8 see log-message viewcontroller not pop when use simulator/device ios 7 view pop root normal. why won't [self.navigationcontroller poptorootviewcontrolleranimated:yes] work in ios 8+ it'll work in ios 7+? mind have changed animated flag no, tried: [self.navigationcontroller popviewcontrolleranimated:yes/no] still same issue?!!

any input appreciated. thank you.

try this

[self dismissviewcontrolleranimated:yes completion:nil];  

instead of poptorootviewcontrolleranimated if can push root view controller work. hope helps.


Comments