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 of prototype 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
Post a Comment