Refresh Target from iPhone-to Universal-App

I started today to upgrade the iPhone application to a universal application. So I use Xcode 4, and I changed my target setting to Universal. Xcode asked me if I want to convert MainWindow to an iPad version, I answered yes and the problems started.


What happened?

If I built my application, the simulator changed my iPhone-Nib to a terrible iPad version. I did not want this and was looking for a feature that converts my iPhone-Nib to iPad-Nib . But I did not find any function like this, and searched for it on the Internet. Someone wrote that this feature was removed in Xcode 4, and the best solution would be to copy iPhone-Nib to Finder in the iPad folder of my project. I did this and added a new “iPad-Nib” to Xcode to set it up a bit. Then I built my project again, and I saw the same recycled, terrible iPhone-Nib as before, so I cleaned up my goal and built it again. Now the simulator showed me the correct "iPad-Nib"but some objects were still not in the right place, but some were ...

I started setting up my Nib for the simulator, now my application looks great in the simulator and like shit in Xcode. Also, my app sometimes downloads the awful, resized iPhone-Nib .

What did I misunderstand? And is there another way to create an iPad-Nib ?

+3
source share
2 answers

When you answered “YES” to convert MainWindow to iPad, Xcode took your iPhone nib, copied it and adjusted Window and Views to have the correct iPad size. It. Now you need to start customizing your views.

, ferbass, - , , . xcode, .

, , UI_USER_INTERFACE_IDIOM(), , . .

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    // Do iPad related stuff
}
else {
    // Do iPhone related stuff
}
+1

All Articles