How to distinguish between Digital/Composite AV Cable on iPad?
I am using UIApplication+ScreenMirroring as software support for mirroring display on iPad1. iPad2 now includes built-in support for mirroring when using the Digital AV Cable. Currently in my app, I am disabling the software support for mirroring when an iPad2 is detected. However, if a user is using an iPad2 but connects a Composite AV Cable, I would like to enable software support (i.e., Composite AV C开发者_运维百科able on iPad2 behaves likes iPad1).
How can I distinguish between a Digital versus Composite AV cable connection on iPad2? Currently, the code I'm using receives UIScreenDidConnectNotification, but I can find no clues in this message.
You may be able to use UIScreen's mirroredScreen property added in 4.3 to determine if mirroring is actually happening due to a supported device being connected. Since this is only in 4.3 and all ipad 2s shipped with 4.3 greater, you would just need to do an os level check to ensure the property exists, if it doesn't it must be an ipad 1.
Apple provides more information in this technote.
精彩评论