MPMoviePlayerController, full-screen, and rotation
MPMoviePlayerController, full-screen, and rotation
- Subject: MPMoviePlayerController, full-screen, and rotation
- From: Fritz Anderson <email@hidden>
- Date: Fri, 03 Feb 2012 11:21:03 -0600
iOS 5 (iPad and Simulator), targeting iOS 5, Xcode 4.2.1.
I find that rotating an iPad while a full-screen MPMoviePlayerController is playing disrupts the layout of the UISplitView behind it.
I'm glad to add code to this thread, but I thought I'd see if a narrative triggered any thoughts right away.
The app is arranged in a split view. The user taps a button in the detail view's toolbar. The action method constructs a URL for a .mov in the application bundle, and points a new MPMoviePlayerController at it. The movie controller's view is made a subview of the detail view (I've also tried making it a subview of the split view). I attach a notification-observer for all player events to tear the movie controller down upon exit-full-screen or playback-finished.
The .controlStyle doesn't seem to matter.
I send -setFullscreen: YES animated: NO to the player, and then -play.
The player plays the movie as expected. The problem comes when I rotate the device repeatedly. The movie continues to play, but when it stops, the split view has been resized (not stretched, not shifted) so its top edge is under the status bar. Rotating the device corrects the layout.
Further, the bar button that split-view detail views must put up in portrait orientation is shifted right (apparently proportionally to the number of rotations). Opening the master-view popover in landscape orientation blacks-out the master view. This cannot be corrected without killing and restarting the app.
During rotation, my detail view receives splitViewController:willHideViewController:… as expected. It never receives splitViewController:willShowViewController:….
This smells like an OS bug to me, but if anyone knows a workaround (or a correction), I'd really like to hear it.
Cross-references:
rdar://10796962
https://devforums.apple.com/message/611704#611704
(me)
https://devforums.apple.com/message/587887#587887
(Has the same view-rescaling problems. 12/2/2011)
— F
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden