2

I am trying to get started with iOS Airplay (split screen and mirroring) and it seems like there is pretty much nothing on the web about this. I am looking for a sample app or a step by step tutorial to set up Airplay on my app, basically to share my screen, not necessarily audio or video (although I am fine with starting with that its that is more simple).

Can anyone point me to somewhere helpful to learn more about it (besides the iOS library)?

Cœur
  • 37,241
  • 25
  • 195
  • 267
moshikafya
  • 3,190
  • 5
  • 22
  • 27

3 Answers3

4

Have a look at the AirPlay Overview documentation, especially the chapter Enriching Your App for AirPlay.

For mirroring, you don't have to do much at all. If you want different content to appear on the AirPlay-connected screen, you basically have to create a separate UIWindow and set its screen property to the corresponding UIScreen.

omz
  • 53,243
  • 5
  • 129
  • 141
  • 2
    I am looking for code samples, since I am not really sure how to integrate this into my app still. can you point to a sample app or code samples maybe? thanks. – moshikafya Jul 01 '12 at 15:46
3

I think what you need to read is "Multiple Display Programming Guide for iOS". Airplay is more related to audio or video than "Multiple Display".

An Additional Window Is Needed to Support an External Display

If your app supports an external device display, you need to create a separate window object to represent the content to display on it. You can show the same content on both displays—this feature is called mirroring and it happens by default—or you can show different content on each display.

Read Presenting Content on an External Display for step by step tutorial.

thunderw
  • 31
  • 4
  • Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Petr R. Aug 17 '13 at 10:31
1

This may be helpful: https://github.com/quellish/AirplayDemo

It shows how to use the airplay display as a secondary screen.

quellish
  • 21,123
  • 4
  • 76
  • 83