0

I'm learning how to use CoreData to store images, and I'm making a blog reader. I have a view That shows all the info saved as a list and when you click it takes you to that article. My problem is that I can't make TableViewCells look as intended. I have added the constraints and not a single of them is being placed.

Here are my constraints: enter image description here

And this is the result: enter image description here

I've deleted them, cleaned, closed xCode, put them again and the same result. Found this answer, checked and nothing. Also this one. In the same project, I have another TableView and it works fine, any ideas why this is happening? Thanks a lot!

Enrique
  • 293
  • 1
  • 2
  • 15

2 Answers2

1

Looks like image is overflowing form the container. Try this

  1. Set the UIImageView content mode to UIViewContentModeScaleAspectFill
  2. Set UIImageView clipToBounds to true.
Bilal
  • 18,478
  • 8
  • 57
  • 72
0

It seems like issue not because of constraints. it because of image to solution for this issue

You have two option to solve this

1) Via code

cell.YOUR_IMAGE_VIEW.clipsToBounds = true

2) Via Interface Builder

enter image description here

Hope this will help you

Ganesh Manickam
  • 2,113
  • 3
  • 20
  • 28
  • Please stop adding *Thanks in advance* in suggested edits. Those have no place in posts here, see https://stackoverflow.com/help/behavior: *Do not use signature, taglines, or greetings.*. You are making extra work for others having to remove those again. – Martijn Pieters Dec 09 '17 at 09:48