Copy link to clipboard
Copied
I need to be able to access the second display for an ios application in actionscript.
the second display is either the airplay display or the cabled lightning to hdmi display from an Ipad.
I don't want the output to be mirrored as it normally is.
I try to get the second display using the Screen.screens array but it always returns a count of 1.
I know in Swift code i can get the second display by subscribing to
let notificationCetner = NotificationCenter.default
notificationCetner.addObserver(self,
selector: #selector(ViewController.setupScreen),
name: NSNotification.Name.UIScreenDidConnect,
object: nil)
Then setting the variable to
let secondScreen = UIScreen.screens[1]
But i can't find an equivalent actionscript notification that will register the second screen being there.
In swift (xcode) i am able to set the second display up completely separately from the main ipad display.
Have something to add?