Answer the question
In order to leave comments, you need to log in
How to make an image in a tablecell full width and dynamic height?
I can't figure out how to make the following construction correctly:
I make a cell in a table view. At the top of the cell is a full-width TextLabel, then a full-width Image, and after the picture, a description, also full-width.
The problem is that I can't figure out how to make the Image stretch in height without breaking the proportional picture.
As far as I understand, everything rests on the height of the cell.
How to make such a cell?
Answer the question
In order to leave comments, you need to log in
If I understand you correctly, then it is done like this
You have a model in which the picture lies and its dimensions (let's say the server throws)
In the height for rov method, you get the size and count
You need to hard-code the costlines in the cell so that everything is anchored to top, bottom, left, right and insert two lines in viewDidLoad into the table view controller:
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 80.0;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question