I am using this famous airplay demo app: https://github.com/quellish/AirplayDemo/
and trying to figure out how to control the secondary screen from the primary. say for simplicity, having a button on screen 1 that if tapped on, will show something on screen 2 (Apple TV).
Any idea how to do that or how to use this demo app to support such a functionality?
thanks guys.
You can do this two different ways, you can try doing this by creating a delegate interface.
Try out this tutorial which explains you exactly how to create/use a delegate.
See: http://www.ios-developer.net/iphone-ipad-programmer/development/delegates/how-to-create-a-delegate
Or you can create a singleton of your class where you load your view controller.
So you can call this singleton and call your functions of the other view controller.
For singleton see: http://getsetgames.com/2009/08/30/the-objective-c-singleton/
I simply load my view controller in my AppDelegate and then when I push a button I call the UIApplication sharedInstance of my app. See the code below for a counter:
I hope this is very helpful, if there you have any questions let me know :-).