Re: Add target-action to AVPlayerViewController Done or subclass instead?
Re: Add target-action to AVPlayerViewController Done or subclass instead?
- Subject: Re: Add target-action to AVPlayerViewController Done or subclass instead?
- From: "Mazzaroth M." <email@hidden>
- Date: Mon, 10 Nov 2014 21:36:02 -0500
The solution was to simply subclass AVPlayerViewController and implement
the orientation methods.
On Sun, Nov 9, 2014 at 11:02 PM, Mazzaroth M. <email@hidden> wrote:
> 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