help with the constrains in a table view in swift 4

0

I have the following problem with tables I'm creating a custom table view I added an image and a title I'm uploading the images from a class and I load all the image well and the title but when viewing it in the simulator it looks like this:

and I want it to be see how it is in the Xcode in the prototype cells to the image I put constrains of 0,0,0,0 and it looks like that ugly but if I delete the contrains it appears as in the Xcode a bit smaller: (

    
asked by Jonathan Rivera 22.12.2017 в 04:03
source

2 answers

0

When you use custom cells sometimes you must add all possible constants for all the objects and in this way make the cell adapt to the size of the objects it contains.

Try adding a View to the cell, adjust its margins and then within it add the image and the title.

    
answered by 30.12.2017 в 17:09
0

If your problem is that the background image escapes from the cell, try leaving from the IBuilder by selecting the Category Image property Content Mode = AspectFill and selecting the property Drawing Clip to Bounds

    
answered by 10.01.2018 в 22:15