How do I change UIView Size?

前端 未结 8 1963
抹茶落季
抹茶落季 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:24

    Here you go. this should work.

    questionFrame.frame = CGRectMake(0 , 0, self.view.frame.width, self.view.frame.height * 0.7) 
    
    answerFrame.frame =  CGRectMake(0 , self.view.frame.height * 0.7, self.view.frame.width, self.view.frame.height * 0.3)
    

提交回复
热议问题