简体   繁体   中英

How can i design Single xib for iphone3.5,and iphone 4 inch screen (ios6 and ios7)?

I created my application as tabbar application with iphone screens. It works well earlier. Now i want to change my tabbar application to support for iphone3.5 and 4 inch screen (in ios6 and ios7). In past i have designed only single xib for this.

is it possible to support all those screens with single xib? Please help me on this.

Notes:

I have latest xcode5. I have tried autoresizing , but it is very difficult to understand. Because its work for 3.5 inch screen and 4 inch screen in ios6 but view goes out of the screen in ios7.

That's not because of the size.

In iOS7 both top and bottom bars are transparent.. That's why your views get resized and covered by the bars.

To fix this simply add this lines to your viewDidLoad method:

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)])
    self.edgesForExtendedLayout = UIRectEdgeNone;
if ([self.tabBar respondsToSelector:@selector(setTranslucent:)])
    self.tabBar.translucent = NO;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM