开发者

universal application in Iphone

wh开发者_如何学运维at are the design changes that i have to make in xib files to convert appication in universal application


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜