Add target-action to AVPlayerViewController Done or subclass instead?
Add target-action to AVPlayerViewController Done or subclass instead?
- Subject: Add target-action to AVPlayerViewController Done or subclass instead?
- From: "Mazzaroth M." <email@hidden>
- Date: Sun, 09 Nov 2014 23:02:15 -0500
I have an ios8 portrait-only iphone app, but when presenting a
AVPlayerViewController, I'd like to have it show in landscape. I got this
working by creating a container view controller
SCRParentPlayerViewController and in its -viewDidLoad I set a
AVPlayerViewController as a childViewController(using the typical methods).
I then override
-preferredInterfaceOrientationForPresentation
-supportedInterfaceOrientations
-shouldAutorotate
Finally I -presentViewController:parentPlayerViewController. This all works
fine and dandy, but the Done button in the child AVPlayerViewController
does not dismiss the presentation when tapped. Any suggestions? Should I
just subclass AVPlayerViewController?
I'm wondering if there is a way to add action and target to the Done
button, which is what I'd prefer.
Xcode 6.1
iOS 8.1 simulator
_______________________________________________
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