i am trying to make self sizing table view. the table view cell before editing is like this
there are 2 type of post in this table view cells. a post without image, and a post with an image. I want to make that second post 'Testting' which is only contains a text to shrink up using self sizing table view. I use this line of code in the viewDidLoad
// to set the dynamic height of table view
tableView.estimatedRowHeight = 100
tableView.rowHeight = UITableViewAutomaticDimension
but the result it seems ugly. I think have used the right auto layout constraint before implementing self sizing table view. but i don't know what went wrong in here. it seems that it follows/depends the height of the image even though the image is not there
the autolayout contraints I used is like this
username label constraints
avatar image constraints
post text label constraints
i suspect because it has 2 different constraint, one with image and the other doesn't have image. so how do i fix that ?
heightForRowAt
implemented? Also, are you getting messages about your layout in the Xcode console?? If not, what happens when you use the View Debugger? Does it report any ambiguity issues?