2017-09-10 18 views
0

我在界面构建器中有以下场景。UIVIew大小在界面构建器中使用设备大小并且没有限制

enter image description here

和在控制器的viewDidLoad中功能下面的代码

print(String.init(format:"baseCircleView width %f height %f", baseCircleView.bounds.size.width, baseCircleView.bounds.size.height)) 
print(String.init(format:"userDrawingView width %f height %f", userDrawingView.bounds.size.width, userDrawingView.bounds.size.height)) 
print(String.init(format:"View width %f height %f", self.view.bounds.size.width, self.view.bounds.size.height)) 

当我启动应用程序(在iPhone6模拟器但与“查看:iPhone SE”,在故事板中选择)中,i具有在控制台中执行以下操作:

baseCircleView宽度320.000000 504.000000高度

userDrawingView宽度320.000000高度504.000000

查看宽度375.000000高度667.000000

我不明白为什么我2次从设备推断出它们的大小“查看:iPhone SE”情节板中的选择,而不是他们上海华。

有人能帮我弄清楚有什么不对吗?

回答