V
V
Vyacheslav2015-08-17 20:26:38
iOS
Vyacheslav, 2015-08-17 20:26:38

Why does UITableView's dynamic height work weird?

Hello. Started learning Swift and wanted to rewrite the app for my website. In the new xCode, UITableViewCell has support for dynamic cell height. I looked at the manuals and tried it, but it works somehow strange. Some messages stretch the cell completely, and some are simply cut off. The picture shows how the middle quote is cut off on the 3rd line, and immediately below it goes a long one and is not cut off. And sometimes a direct quote from 1 line is cut off. Maybe special characters or something else that affects? Has anyone come across?
7de9f9dde73146a8962e8afd1b320786.png
And the second such small sub-question. Standard UITableView stretched to full width where does this indent from the left edge of the separator strip (red arrows) come from? Everywhere where I looked in the examples it is, how to get rid of it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
An, 2015-08-18
@Flanker_4

The second is fixed like this
stackoverflow.com/questions/25770119/ios-8-uitable...
But the first is such a gift from Apple. It sometimes doesn't work
Detailed description from radar
useyourloaf.com/blog/2014/08/07/self-sizing-table-...
Here is another one
openradar.appspot.com/17799811
There are different workarounds, see here
useyourloaf.com /blog/2014/08/07/self-sizing-table-...
But an extra reloadData usually helps

V
Vyacheslav, 2015-09-01
@Lomiren

Found a very simple solution to solve the second problem.
TableView has separator settings. Select Custom and remove the indent on the left, which is 15 by default.
I hope it helps someone.
The first question is still open, some words are still swallowed, Reload does not help because the data is already reloaded as it is taken from json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question