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:

enter image description here

hope you.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -