React Native: How to Determine if Device is iPhone or iPad

后端 未结 10 863
花落未央
花落未央 2021-02-01 16:32

I know with React Native that we have the ability to determine whether iOS or Android is being run using the Platform module, but how can we determine what device i

10条回答
  •  臣服心动
    2021-02-01 17:06

    You can roughly determine what iOS device is being used without any external dependencies... First query Platform.OS then the Dimensions module allows you to query the device for screen dimensions which can be translated to devices: http://iosres.com/

提交回复
热议问题