0

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...

Daniel
  • 23,129
  • 12
  • 109
  • 154
fairzy
  • 37
  • 6

2 Answers2

3

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.

Martin
  • 11,881
  • 6
  • 64
  • 110
0

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

Mateus
  • 2,640
  • 5
  • 44
  • 62