Created
April 23, 2012 00:12
-
-
Save jdewind/2467675 to your computer and use it in GitHub Desktop.
iOS mirroring selection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure MediaPlayer.framework has been added and the MPAudioVideoRoutingPopoverController interface has been declared. | |
@interface MyViewController () | |
@property (strong, nonatomic) MPAudioVideoRoutingPopoverController *airplayPopoverController; | |
@end | |
- (void)someButtonTapped:(id)sender { | |
self.airplayPopoverController = [[MPAudioVideoRoutingPopoverController alloc] initWithType:0 includeMirroring:YES]; | |
self.airplayPopoverController.delegate = self; | |
[self.airplayPopoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment