【发布时间】:2014-12-29 15:44:49
【问题描述】:
我无法在启动时修改 UIView 高度。
我必须使用 UIView,我希望一个屏幕尺寸 * 70,另一个来填补空白。
这就是我所拥有的
@IBOutlet weak var questionFrame: UIView!
@IBOutlet weak var answerFrame: UIView!
let screenSize:CGRect = UIScreen.mainScreen().bounds
和
questionFrame.frame.size.height = screenSize.height * 0.70
answerFrame.frame.size.height = screenSize.height * 0.30
它在运行时对应用没有影响。 我使用自动布局,但我只有边距限制...
我做错了吗?
【问题讨论】:
-
questionFrame.frame = CGRectMake(0, 0, self.view.frame.width, self.view.frame.height * 0.7) answerFrame.frame = (0 , self.view.frame.height * 0.7, self.view.frame.width, self.view.frame.height * 0.3) 你追求的是这样的吗?
标签: uiview swift height xcode6