At the moment, I\'m using a UITableView along with other views that are contained in a UIScrollView. I want the UITableView to have it
Here is the obj-C version. It's based on a solution from user @MuHAOS
@implementation SizedTableView
- (void)setContentSize:(CGSize)contentSize {
[super setContentSize:contentSize];
[self invalidateIntrinsicContentSize];
}
- (CGSize)intrinsicContentSize {
[self layoutIfNeeded]; // force my contentSize to be updated immediately
return CGSizeMake(UIViewNoIntrinsicMetric, self.contentSize.height);
}
@end