iphone to ipad xib file change
I have the two xib files 1.main 2.language translator this is a iphone app. I want to change UNIVERSAL APP. i upgrade the universal application. now automatically created mainwindow-ipad.xib. i run this app in xcode 3.2 version but it display left corner only . how can i change this app to universal ... its big headache to me.. anyone help me
Thanks in advance, Suresh.m
检查应用程序是在iPhone上还是在iPad上,并相应地加载笔尖,我的意思是你必须保持你的界面生成器文件的Ipad版本并根据目标设备加载它们
if([[UIDevice currentDevice]interfaceIdiom]== UIUserInterfaceIdiomPad)
{
//Load ur ipad nib file
}
else
{
//Load ur iphone nib file
}
I usually create a new universal project, and then "move" my code into the template provided. I find that much easier then trying to flip all the other knobs.
I found iphone_bharat's example interesting, but it has a small type so I had to fix it and clean it up a little bit.
+ (bool)iPad
{
// Can use UI_USER_INTERFACE_IDIOM() for iOS less than 3.2
if( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad )
return YES;
else
return NO;
}
链接地址: http://www.djcxy.com/p/95706.html
下一篇: iphone到ipad xib文件的更改