It looks as though this is actually a bug in UITableView.
In my case it is triggered when the parent view lays out subviews but the table view is not yet visible - its height constraint is 0.
At the point the exception is thrown the table view is actually in the view hierarchy - it is just invisible.
IMHO it is not the responsibility of a user of UITableView to check its view state inside the internal implementation of its layoutSubviews method.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: