I have UIScrollView with UITableView and other subViews in it. After filling UITableView with data I need to resize UITableView and UIScrollView content size to fit the data in TableView. How is it possible to do?
I have UIScrollView with UITableView and other subViews in it. After filling UITableView with
Share
Since you are providing the
and
You should be able to pre-calculate the size of your UITableView by multiplying the height for the number of visible rows at a time you need.
You may also change the setBounces: method to avoid your table from bouncing inside your UIScrollView (given that you set the height to the max number of rows)
All you would need to do after is setFrame: for the UITableView according to that value and then resize your UIScrollView to the UITableView’s size plus the rest of your subviews.