How do I change UIView Size?

前端 未结 8 1965
抹茶落季
抹茶落季 2020-12-07 23:48

I have trouble with modifying my UIView height at launch.

I have to UIView and I want one to be screen size * 70 and the other to fill the gap.

here is what

8条回答
  •  情歌与酒
    2020-12-08 00:36

    Assigning questionFrame.frame.size.height= screenSize.height * 0.30 will not reflect anything in the view. because it is a get-only property. If you want to change the frame of questionFrame you can use the below code.

    questionFrame.frame = CGRect(x: 0, y: 0, width: 0, height: screenSize.height * 0.70)
    

提交回复
热议问题