简体   繁体   中英

How can I upgrade an iPhone app to iPad app in xcode 4.2?

I have upgraded my iPhone app to universal by right right clicking the project target and selecting duplicate option. Then there was 2 choices-duplicate only and 'duplicate and transition to iPad'. I choose second one. Then a group of iPad XIB files(having same name as iPhone XIBs) called Resources_iPad is automatically added to the app. But still when I choose iPad simulator to run the project, the app chooses only iphone XIBs. Can anyone help me to resolve this problem?

转到目标(或项目)设置,并检查“ Targeted Device Family设置为iPhone/iPad

Any XIBs loaded in code will still load the iPhone version. You should use UIUserInterfaceIdiom() to determine which XIB to load. Also make sure you have correctly set your iPad interface file in Info.plist if you specify your iPhone one there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM