简体   繁体   English

Xcode模拟大小度量 - Freeform和None设置之间的差异

[英]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.

相关问题 Xcode Storyboard中“推断”和“自由形式”有什么区别? - What is the difference between “Inferred” and “Freeform” in Xcode Storyboard? 在 XCode 11 中使用 FreeForm 作为模拟尺寸时,无法将 UIView 安装到 UIViewController 的全尺寸 - Not able to fit UIView to the full size of UIViewController when using FreeForm as Simulated Size in XCode 11 如何修复“Freeform Size模拟指标在Xcode 4.2之前不可用”警告? - How can I fix “Freeform Size simulated metrics are not available prior to Xcode 4.2” warnings? 在Xcode中使用自由格式的模拟尺寸时,如何使屏幕适应? - How to make the screen adapt when you use a freeform simulated size in Xcode? 如何使用Freeform Simulated Size更改scrollView的高度但不更改width - How to use Freeform Simulated Size to change height of scrollView but not width 为什么Xcode中缺少状态栏模拟度量? - Why Status Bar simulated metric is missing in Xcode? IB 中的“自由格式”大小 - 故事板 - "Freeform" size in IB - Storyboard 无法在XCODE故事板上使用FREEFORM - Unable to use FREEFORM in XCODE STORYBOARD Xcode默认模拟位置 - Xcode Default simulated location 无选项未包含在模拟指标中 - None option not included in simulated metrics
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM