image - Imageview changes location on runtime - Swift -
hello,
my imageview have set in custom table view cell moves set image different place on run time.
the thing confuses me if manually set image in attributes inspector image in place supposed be. when setting image programatically problem arise.
below code using cell creation function generate tick or cross.
// cell information if answersbool[indexpath.row] == false { cell.imageview!.image = uiimage(named: "crossicon.png") } else { cell.imageview!.image = uiimage(named: "tickicon.png") }
this happens on run time.
this cell looks in storyboard.
first of remove constraint imageview after select imageview , click on pin menu add 5 constraint shown in below image:
hope you.
Comments
Post a Comment