I'm trying to get the height of all of a table's contents so I can update the container it is in. This will allow the container and other views in the scroll view to scroll together.
Swift:
var tableViewHeight: CGFloat { tableView.layoutIfNeeded() return tableView.contentSize.height }
Objective-C
- (CGFloat)tableViewHeight { [tableView layoutIfNeeded]; return [tableView contentSize].height; }
1.4m articles
1.4m replys
5 comments
57.0k users