简体   繁体   中英

ios: uiscrollview and uiview autolayout

I have uiscrollview and uiview . When uitextview is touched, uitextview size will be large size and uiscrollview size will be small size and there is a problem because of autolayout.

How can I set constraints of uiscrollview and uiview ?

May try it:
What I say below is about constraint:
UIScrollView top, left, right equal self.view top, left, right
UIScrollView bottom equal UIView bottom
UIView left, right, bottom equal self.view left, right, bottom UIView height equal 200(you set it)

OK, when you UITextView is touched, set the UIView height constraint to what you want(maybe 300)

I think it works!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM