开发者

How to distinguish between Digital/Composite AV Cable on iPad?

开发者 https://www.devze.com 2023-03-09 17:20 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消