iOS: dynamic height UIScrollview autolayout -
i making article detail view facebook. view have content(profile image, writer, date, content text) , comment write view. top view uiscrollview
, bottom view uiview.
uiscrollview
have uiimageview
, uilabel*3
, uiview
have uitextview
, uibutton
.
when touch uitextview
in uiview
, keyboard comes up. uiscrollview
smaller , uiview
position moved. , user write text, uitextview
line added uiview
size extended.
eventually uiscrollview
, uiview
height not determinate.
how set autolayout view?
may try it: below 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 uitextview touched, set uiview height constraint want(maybe 300)
i think works!
Comments
Post a Comment