[英]Xcode simulated size metric - difference between Freeform and None setting
When I make custom UIViews I usually start by creating a xib file, and in the Attributes Inspector I change the Size property in the Simulated Metrics section to None so I can resize the view to what I want. 当我创建自定义UIViews时,我通常首先创建一个xib文件,然后在Attributes Inspector中将Simulated Metrics部分中的Size属性更改为None,这样我就可以将视图调整为我想要的大小。 I am wondering, is there a difference between this setting and the Freeform setting? 我想知道,这个设置和Freeform设置有区别吗? I am using Xcode 4.6. 我正在使用Xcode 4.6。
The only difference when changing the Simulated Metrics is how the view looks in the interface builder. 更改模拟度量标准的唯一区别是视图在界面构建器中的外观。 You can go to to the size tab of the inspector and change the size of the view. 您可以转到检查器的“大小”选项卡并更改视图的大小。 In iOS this is only useful when you include one view inside another view and want to see how it looks 在iOS中,仅当您在另一个视图中包含一个视图并希望查看其外观时,此功能才有用
UIViewcontroller *vc = ...
[self addChildViewController:vc];
[self.view addSubview:vc.view];
vc.view.frame = CGRectMake(0, 0, 50, 50);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.