I have a cell that contains a few stackviews, bottom stackView contains a textView and a custom separator.
I want to create an option, when user tap on cell, it
I didn't find answer, why the strange behavior of textView and cell height is happening, but I have solution for my problem.
So it looks like tableView.estimatedRowHeight = 160 and tableView.rowHeight = UITableViewAutomaticDimension don't respect textView's maximum number of lines for all cells. cellForRow works fine, it sets the limitation, but the rows height is sometimes expanded and sometimes contracted.
So I unwrapped textView and the bottom separator from StackView, replaced TextView with Label and set autolayaut constraints. Now it works fine, without strange behavior.