ios - How do I resize a constrained imageView, inside a table cell, in swift? -
i have table view controller image view, inside prototype cell, has various size/location constraints on it. want setup programatic view constraints but, because cell built , reloaded within "cellforrowatindexpath" function i'm not sure how set (i'm not sure declare original constraints can update .constant when each cell reloaded).
for coming across this: solution create iboutlet, within uitableviewcell. then, when cell built, within cellforrowatindexpath, call animation:
cell.itemrightspace.constant = 100 cell.item1.layoutifneeded() uiview.animatewithduration(0.75, delay: 0.3, options: nil, animations: { () -> void in cell.progress1rightspace.constant = 0 cell.progress1.layoutifneeded() }) { (isfinished) -> void in }`
Comments
Post a Comment