[英]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. 我使用iphone屏幕将我的应用程序创建为tabbar应用程序。 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).
现在我想更改我的tabbar应用程序以支持iphone3.5和4英寸屏幕(在ios6和ios7中)。 In past i have designed only single xib for this.
在过去,我只为此设计了单个xib。
is it possible to support all those screens with single xib? 是否有可能用单个xib支持所有这些屏幕? Please help me on this.
请帮帮我。
Notes: 笔记:
I have latest xcode5. 我有最新的xcode5。 I have tried autoresizing , but it is very difficult to understand.
我尝试过autoresizing,但很难理解。 Because its work for 3.5 inch screen and 4 inch screen in ios6 but view goes out of the screen in ios7.
因为它在ios6中用于3.5英寸屏幕和4英寸屏幕,但视图在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. 在iOS7中,顶部和底部条都是透明的。这就是为什么您的视图会被调整大小并被条形图覆盖。
To fix this simply add this lines to your viewDidLoad method: 要解决此问题,只需将此行添加到viewDidLoad方法:
if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)])
self.edgesForExtendedLayout = UIRectEdgeNone;
if ([self.tabBar respondsToSelector:@selector(setTranslucent:)])
self.tabBar.translucent = NO;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.