xcode中的约束错误

时间:2016-12-28 11:25:13

标签: ios iphone xcode storyboard constraints

我认为它有4个约束:

enter image description here

它工作正常,但当我将故事板中的视图更改为另一个设备(例如Iphone 4s)但我为Iphone 6构建时,它更改为: enter image description here enter image description here

和奇怪的部分是当我改变Iphone6的视图时它工作正常:

此屏幕截图是我更改故事板视图的iphone 6

enter image description here enter image description here

1 个答案:

答案 0 :(得分:1)

尝试将UIView方法中的viewDidLoad()框架设置为

view.frame = CGRectMake(0, 70, self.view.frame.size.width, self.view.frame.size.height-70)

70是放置在视图上方的标题的静态值,您可以根据自己的视图进行更改。