Post

Replies

Boosts

Views

Activity

Reply to UITableViewCell layout not updating until cell is reused
Calling cell.layoutIfNeeded() before returning from tableView(_:, cellForRowAt indexPath:) forces resizing its internal elements and its height will be calculated correctly on the first usage. This shouldn't always be done but solves cases where there could be some delayed calculation going on for the next run loop.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’22