ios - How to hide and unhide a imageview in a tableview cell? -


i using tableview 2 rows. each row having label, button , image view .initially the row height 50 no image. when click button in cell image picker open , select image camera roll. how can update tableview height 100 image view in cell?

you can achieve using autolayout. if design cell in xib :

cell height 100 : enter image description here

with these constraints on image view :

enter image description here

it height 50 :

enter image description here

the weird line image view got automatically shrunk autolayout. looks bad in interface builder, ok on device/simulator. 1 thing have remember remove image (not image view!) when cell @ 50 height , set when @ 100.

also i'd recommend learn autolayout powerful tool.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -