• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Add target-action to AVPlayerViewController Done or subclass instead?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Add target-action to AVPlayerViewController Done or subclass instead? (From: "Mazzaroth M." <email@hidden>)

  • Prev by Date: Re: Weird crash in -[NSSearchField setRecentSearches:]
  • Next by Date: Re: How to obtain paths of laid-out text
  • Previous by thread: Add target-action to AVPlayerViewController Done or subclass instead?
  • Next by thread: Re: WWDC App
  • Index(es):
    • Date
    • Thread