Question

I have a download button in my view and when the button is clicked, the app opens the app store with [[UIApplication sharedApplication] openURL] However when I switch back to my app, I find that the [popViewController animated:YES] in my app is not animating. I debug it for a few days and solved the problem, the reason is that in my applicationWillEnterForeground method, i did this:

[tabBarController.selectedViewController viewWillAppear:YES];

AND I had the bug. My question is, why after i invoked this method, all my [popViewController animated:YES] is not working...

Was it helpful?

Solution

I don't know exactly why you had that bug, but as Apple documentation, you shouln't call the - (void)viewWillAppear:(BOOL)animated method.

UIViewController doc

It's a notification method, made to be overriden, and never called.

OTHER TIPS

I didn't understood well your question,but notice that the correct way to pop a viewncontroller is like this:

[self.navigationController popViewControllerAnimated:YES];

LUCKY

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top