• 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
Add target-action to AVPlayerViewController Done or subclass instead?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Add target-action to AVPlayerViewController Done or subclass instead?
      • From: "Mazzaroth M." <email@hidden>
  • Prev by Date: Re: Weak linking
  • Next by Date: Re: Weird crash in -[NSSearchField setRecentSearches:]
  • Previous by thread: Re: NSSplitView parallel motion
  • Next by thread: Re: Add target-action to AVPlayerViewController Done or subclass instead?
  • Index(es):
    • Date
    • Thread