Will #if __IPHONE_4_0 work on iPad?

后端 未结 2 1355
滥情空心
滥情空心 2021-01-20 04:35

Will this check work on the iPad as well as iPhone? I guess I am just confused about using the term \"iPhone\" on an iPad. Is there something else I need to check for iPad O

2条回答
  •  日久生厌
    2021-01-20 05:20

    The code you posted is a compiler directive. This means that it will not run on iPad or iPhone. It is handled when you build your app binary. Incidentally, if you're building for iPad, then you are building for 3.2, not 3.0 or 4.0.

    If you use 3_2 or 4_2 instead of 3_0 or 4_0 it should work.

    Good luck.

提交回复
热议问题