Type Property

screens

Returns an array containing all of the screens attached to the device.

Declaration

class var screens: [UIScreen] { get }

Return Value

An array of UIScreen objects.

Discussion

The returned array includes the main screen plus any additional screens connected to the device. The main screen is always at index 0.

Not all devices support external displays. Currently, external displays are supported by iPhone and iPod touch devices with Retina displays and iPad. Older devices, such as the iPhone 3GS do not support external displays.

See Also

Getting the Available Screens

class var main: UIScreen

Returns the screen object representing the device’s screen.

var mirrored: UIScreen?

The screen being mirrored by an external display.