我在启动时修改我的UIView高度有问题。如何更改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)你喜欢这样的事情吗? – User4 2014-11-03 02:00:24