Steve
Steve

Reputation: 959

Autolayout TableView Issue

I'm having a strange issue with my tableview, debugging the view hierarchy i'm getting this

enter image description here

I've tried a lot of constraints with no result, how should I setup my tableview to avoid that kind of misplacement ?

Edit

I've a custom cell with an image view, actually set just this 5 constraints

enter image description here

Top, bottom, leading and trailing values are 0

Upvotes: 0

Views: 59

Answers (1)

ChintaN -Maddy- Ramani
ChintaN -Maddy- Ramani

Reputation: 5164

You just need to set Your UITableView constraint to Leading,Trailing, Top and Bottom. and also for your UIImageView set same constraint. so your imageview will show fit to cell as per table width. no need to set Align Center X constraint.

Upvotes: 1

Related Questions