Using -presentModalViewController:animated: with UITabBarController NOT animated
So the rootViewController
for this application is a UITabBarController
subclass. And we're having a bizarre issue where we cannot get a UITabBarController
to -presentModalViewController:animated:
if we're passing NO
to animated. We've tried a variety of methods: -viewDidLoad
, -viewWillAppear
, -viewDidAppear
and can only get it to work if we do it after a delay, which is hacky.
I decided to break this out into a test and found that if I have a UIViewController
that calls -presentModalViewController:animated:
in the开发者_开发技巧 -viewDidAppear
method it works as expected with both YES
and NO
for the animated
parameter. However if this VC is instead a UITabBarController
, it works if animated
is YES
but not if it is NO
.
Any ideas? Is this a bug? I've searched online and through documentation and can't find a reason that UITabBarController shouldn't be able to present a view this way.
This definitely sounds like a bug. I'd suggest you file a bugreport with Apple. If it's blocking your project, you could submit it through one of your support incidents with Apple, and if they find it really is a bug they'll refund that support incident (so you don't loose anything). If it isn't a bug, they'll be able to give you a solution.
精彩评论