swift - iOS Constraints of image view inside table view cell gets misplaced on scroll -


the constraints image view inside table view cell gets distorted on scroll.

the constraints fine on initial load , view. once table view cell goes out of view , scroll it, image view gets displaced.

this screenshot of single tableviewcell. globe icon misplaced original spot (left of name , designation) , overlaps on text below. screenshot showing misplaced image view

screenshot of prototype cell storyboard screenshot of cell storyboard

the black lines show constraints added on storyboard. using xcode 8.0 swift 3. doing wrong constraints ?

it seems missing height constraint on image view. should able fix problem if add that.

also, maybe related well, can set image view's content mode aspect fit? sometime this:

objc

[self.imageview setcontentmode:uiviewcontentmodescaleaspectfit]; 

swift

self.imageview.contentmode = .scaleaspectfit 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -