开发者

Converting IPad App to Universal App

开发者 https://www.devze.com 2023-04-07 05:38 出处:网络
We currently have an app that targets the IPad. We now would like to target the IPhone aswell. Im just wondering how we go about this? UI layout and functionality will be different but under the hood

We currently have an app that targets the IPad. We now would like to target the IPhone aswell. Im just wondering how we go about this? UI layout and functionality will be different but under the hood they will be sharing a lot of the same code.

Am I best creating a Universal app? or having to seperate apps one for the ipad and one for the iphone?

Any help wi开发者_开发知识库ll be greatly appreciated.

Thanks


Use these two macros

#define FOR_IPAD   (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define FOR_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)

if(FOR_IPAD)
  //load view for iPAD
else
  //load view for iPhone
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号