what are the design changes that i have to make in xib files to convert appication in universal application
Asked
Active
Viewed 206 times
1
-
1possible duplicate of [Universal application](http://stackoverflow.com/questions/5321932/universal-application) – DarkDust Mar 28 '11 at 09:38
-
This question isn't a FAQ any more, it's a VFAQ (very frequently asked question). See for example [this question](http://stackoverflow.com/questions/5321932/universal-application) or use the search for dozens more related questions. – DarkDust Mar 28 '11 at 09:41
-
possible duplicate of [How to create Universal application?](http://stackoverflow.com/questions/4656272/how-to-create-universal-application) – Qantas 94 Heavy Jun 20 '14 at 08:59
3 Answers
2
One way to do it:
Go to project->summary (in xcode4), set "Devices" to "Universal".
In your info.plist, define two different .xib's, one for iPhone and one for iPad:
<key>NSMainNibFile~ipad</key>
<string>MainWindow-iPad</string>
<key>NSMainNibFile</key>
<string>MainWindow-iPhone</string>
And connect them both to your app delegate. The launcher will load the correct xib at startup.
You can then use
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
to check if you're on iPad or iPhone.

uvesten
- 3,365
- 2
- 27
- 40
0
To convert your application in Universal, you have to create new .xib for the new device. Then you will detect if you are on iPad or iPhone and load the good one.

Ludovic Landry
- 11,606
- 10
- 48
- 80
0
hi friend you have to create two xib , One for iphone and other for ipad and use them by detecting which device is using your application.

vijay adhikari
- 2,455
- 1
- 16
- 22