Objective-C code to detect and use an external monitor attached to IOS device