[英]iOS - Support xib on iphone 5 Resolution
我在xib文件中设计了一个3.5大小的视图。 当我在iphone 5分辨率上运行时,它在底部显示一个空格。
有没有办法支持一个xib到两个分辨率。
谢谢。
编辑
if( IS_IPHONE_5 )
{
_helpButton = [[UIButton alloc] initWithFrame:self.view.bounds];
_LogoImage = [[UIImageView alloc] initWithFrame:self.view.bounds];
[_helpButton setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
[_LogoImage setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
CGRect frameRect = _helpButton.frame;
frameRect.origin.y += 300;
_helpButton.frame = frameRect;
}
1)打开xib文件的自动布局,让它根据屏幕高度自动调整或2)关闭自动布局,然后设置字符串和支柱根据它的大小增大视图或3)使用插座和编程设定它的高度。
没关系你有3.5英寸设备的xib,如果支持iOS <6.0,请不要使用AutoLayout 。
你必须像下面那样设置你的UIView resize属性,应用程序应该正常工作而不做任何改动。
检查你的视图是否有硬编码的高度
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.