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?
Asked
Active
Viewed 265 times
2 Answers
0
go to target (or project) settings and check if Targeted Device Family
set to iPhone/iPad

RolandasR
- 3,030
- 2
- 25
- 26
-
even when I set this, app loads autoresized iPhone XIBs for iPad. But not the new XIBs – viji Dec 09 '11 at 08:53
-
@vijj did you use ~ipad as the postfix of your xib-names? – Till Dec 09 '11 at 08:56
-
@Till no.they are XIBs with same name as iPhone XIBs and are generated when i choose 'duplicate and transition to iPad' as i said.a copy-Info.plist is also generated. Since the app itself generated the XIBs with same name, i can't select nibname via code. – viji Dec 09 '11 at 09:10
-
one way i found is to rename the xibs by adding -iPad and select different nib names for ipad and iphone. but the app itself gave these names, i thought there is some simpler way to do this.. that is why asked – viji Dec 09 '11 at 09:13
-
@viji The exact same name? That will most likely not work - check for warnings when building. And again, use the proposed postfix to get them automatically chosen by your app. – Till Dec 09 '11 at 09:14
-
@Till There are no warnings/errors since they are autogenerated. I will continue using the prefix for this project. Please inform me if there is any other way to do this. Thanks for your suggestions – viji Dec 09 '11 at 09:32
0
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.

jrtc27
- 8,496
- 3
- 36
- 68
-
Since the app itself generated the XIBs with same name, i can't select nibname via code – viji Dec 09 '11 at 09:13
-
one way i found is to rename the xibs by adding -iPad and select different nib names for ipad and iphone. but the app itself gave these names, i thought there is some simpler way to do this.. that is why asked – viji Dec 09 '11 at 09:14