I subclass UITableViewCell and use PureLayout to apply constraints but the app terminates with the error "PureLayout is not thread safe, and must be used exclusively from the main thread".
In the function...
initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
I have just applied one constraint
[self.label autoSetDimension:ALDimensionHeight toSize:50];
When this is removed, the app doesn't crash
update--- it's probably because I'm calling an API asynchronously
Wrap your init call in a
dispatch_async
to the main thread then...Without seeing the rest of your code.
But if you are needing to do this I suspect you are going about things the wrong way. What you should be doing is updating the data with the result from your async call and calling
reloadData
on the tableview.Something like...