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
:
with these constraints on image view :
it height 50 :
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
Post a Comment