Reputation: 37
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...
Upvotes: 0
Views: 1342
Reputation: 12215
I don't know exactly why you had that bug, but as Apple documentation, you shouln't call the - (void)viewWillAppear:(BOOL)animated
method.
It's a notification method, made to be overriden, and never called.
Upvotes: 3
Reputation: 2668
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
Upvotes: 0