iOS How to detect iPhone X, iPhone 6 plus, iPhone 6, iPhone 5, iPhone 4 by macro?

前端 未结 13 681
一整个雨季
一整个雨季 2020-11-28 01:17

How to detect device model by macro? i had using something like this but the result on the simulator alway IS_IPHONE_5

#define IS_IPAD (UI_USER_INTERFACE_IDI         


        
13条回答
  •  悲&欢浪女
    2020-11-28 01:40

    I can confirm the bug goes away when you set a Launch Screen.

    I kept my launch images, and added MainStoryboard to Launch Screen and the simulator recognized the devices correctly.

提交回复
热议问题