iOS get physical screen size programmatically?

前端 未结 11 1938
情话喂你
情话喂你 2020-12-15 03:11

Is this possible? I want the number of inches, not the number of pixels. I know it is approximately 160 ppi. But not exactly.

11条回答
  •  情歌与酒
    2020-12-15 03:52

    If it were available it would be in UIScreen or UIDevice but it is not there.

    You can infer it from info in Erica's UIDevice-extension and the specs for each device listed here on Wikipedia.

提交回复
热议问题