开发者

Trouble presenting Modal View Controller (MPMoviePlayerViewController)

开发者 https://www.devze.com 2023-04-12 02:14 出处:网络
My App starts up, and I have a UITabBarController.On the first tab I have a subclass of UIViewController.It\'s in this class that I have my movie playing functionality.I do not know why, but from this

My App starts up, and I have a UITabBarController. On the first tab I have a subclass of UIViewController. It's in this class that I have my movie playing functionality. I do not know why, but from this class, I cannot presentModalViewController or presentMoviePlayerViewControllerAnimated. I can however add views as a subView. I found this post, which is essentially what I'm trying to do (pres开发者_StackOverflow社区ent a movie player view controller): How to present MPMoviePlayerViewController from a UITabBarController?

But even keeping a reference to the UITabBarController does not work for me. I'm not really sure why this class has problems presenting a modal view controller, versus in other tabs, I am able to. Any thoughts? Thanks.


After more looking, I found that the problem is I cannot present a view modally within the viewDidLoad method.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号