0

My objective is to have an AirPlay option for my iOS app that shows the same content as the iPad (like a mirror) except slightly modified to the 16x9 aspect ratio of the TV.

I have all the initial setup complete, up to the point where I have the second window and the opportunity to set its root view controller.

My current strategy is to create two separate view controllers, one for iPad, one for TV, then create some channel for them to communicate through.

Is this the most efficient way to solve this problem? Is there a better way, perhaps that involves me using the same view controller but with different UIViews?

jscs
  • 63,694
  • 13
  • 151
  • 195
Jaun7707
  • 119
  • 2
  • 9
  • Why not use the same view controller but with auto layout and probably size classes (I’m not very familiar with them, so not sure if they are good option) – idmean Jun 18 '15 at 17:03
  • If I do that, one window goes black. Is there a way to show both windows at the same time? – Jaun7707 Jun 18 '15 at 17:04
  • Of course, didn’t thought of that. A view controller can only be shown within one window at the same time. – If you follow the MVC pattern there should be no problem in creating two instances. Why do they need to communicate? – idmean Jun 18 '15 at 17:06
  • If I have two instances, then they have two different sets of properties correct? So any actions taken on one won't be reflected on the other. – Jaun7707 Jun 18 '15 at 17:08
  • What type of actions are you trying to mirror? UIElements? Drawings? – idmean Jun 18 '15 at 17:11
  • Yeah, I need to change UIElement positioning, transparencies, animations, etc. In addition to unseen properties such as some int and float values. – Jaun7707 Jun 18 '15 at 17:12
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/80914/discussion-between-jaun7707-and-idmean). – Jaun7707 Jun 18 '15 at 17:14

0 Answers0