任何人都可以访问iPhone 8和iPhone X的人知道型号吗?UIDevice.current.modelName
可以访问它。
@anbu所述的信息为:
- iPhone 8:iPhone10,1和iPhone10,4
- iPhone 8 Plus:iPhone10,2和iPhone10,5
- iPhone X:iPhone10,3和iPhone10,6
请记住,如果要使用UIDevice.current.modelName
,则需要创建自己的扩展名,因为这不是UIDevice.current
中的默认值。