Re: MPMoviePlayerController, full-screen, and rotation
Thanks for the suggestion. Following your lead, I called +attemptRotationToDeviceOrientation after installing, and again after removing, the movie-player controller. I made this my -shouldAutorotateToInterfaceOrientation: method: - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation { if (self.demoMovieController) { return interfaceOrientation == self.demoOrientation; } else { self.demoOrientation = interfaceOrientation; return YES; } } This did prevent the movie from rotating. However, when the movie was dismissed, the screen was black. Rotating the device makes what looks to be the master view briefly visible at the corners. So (I am guessing) the detail view is black, and full-screen, and the master view is re-laid-out so that its right edge is at the left edge of the screen. Earlier, I had tried only the -shouldAutorotateToInterfaceOrientation: method above, without + attemptRotationToDeviceOrientation. The effect was the same as without attemptRotation…. — F On 3 Feb 2012, at 12:09 PM, Evadne Wu wrote: > Just a wild guess, but can you use +[UIViewController > attemptRotationToDeviceOrientation] somewhere as a potential workaround? It > seems that the behavior of the movie player messes with rotation notification > handling. Another workaround if you need to target iOS 4.x is to show / hide > the status bar a couple of times. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MPMoviePlayerController, full-screen, and rotation
On 3 Feb 2012, at 11:21 AM, Fritz Anderson wrote: > 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. "This" refers to the misplaced and unremovable detail-popover button. The blackout is corrected with a couple of rotations. — F ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
MPMoviePlayerController, full-screen, and rotation
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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com