LoginSignup
5
5

More than 5 years have passed since last update.

presentViewController:animated:completion: 後の popViewControllerAnimated: が何かおかしいと思ったら。

Posted at

ViewController が以下の様な階層になっていて、

・CustomTabBarController
・・UINavigationController
・・・CustomViewController

いくつか CustomViewController を pushViewController したうえで、CustomViewController から presentViewController したあと dismiss して、
popViewController すると、一応動くけどアニメーションが変になったり、最悪の時には pop しなくなることがあった。

原因は、CustomTabBarController でオーバライドしていた viewDidAppear:animated で、super の viewDidAppear を呼んでいないためだった。
ちゃんと呼んでやることで解決。

- (void) viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    // do something...
}
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5