The MPMoviePlayerController
working fine in iPad with iOS 5, initially the video starts by adding MPMoviePlayerController
to subview of self at certain frame .Pressing full screen button on MPMoviePlayerController
embedded controls displaying the movie in full screen,again tapping the button will bring the video back to the initial frame in iOS 5. But in iOS 6, the when I press full screen button to bring the video to initial frame, the video just gone out of screen. Looks like Apple has made some undocumented change to MPMoviePlayer
class that is causing this weird behaviour. Anyone having the fix for this?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
I have fixed this issue myself, in iOS 6, apple has made some undocumented changes to
MPMoviePLayerController
class, when you tap on full screen button, theviewWillDisappear
andviewDidDisAppear
gets called for both the controller launchingMPMoviePLayerController
and its ParentController.In My Project (a pdf reader), I have a very complex view hierarchy, adding a reader in view Controller, then adding the readerPageContents buttons(image Gallery, video, link) to reader page and then playing video on video button tap.So it was calling the ViewWillDisappear and
ViewDidDisappear
when launching the video in full screen, and when when I press toggle screen button to bring the video to initial frame, theViewWillAppear
andViewDidAppear
of both controllers called again and I was creating the pdf page again in parent's controller viewDidAppear which was removing the video.So easier fix it to avoid
ViewDidDisappear
andViewWillDisappear
gets called by setting someBOOL
.