Im trying to build a scroll within 977 strings of data in the array placed in UITableView
, well I'm using the following to do automatic calculation for the
cell height : mytableView.rowHeight = UITableViewAutomaticDimension
.
And using the following to scroll to index:
self.mytableView.scrollToRowAtIndexPath(NSIndexPath(forItem: placetogo, inSection: 0), atScrollPosition: UITableViewScrollPosition.Bottom, animated: false)
Whats happening here is the scroll is taking 16 seconds to scroll to that last index of the array which will be very annoying for the user, when i made the rowHeight = 400 or 300
static value , then it scroll with less than a second to last index.
My cells are different in there heights, so i cannot use the static cell height. I've made a research about it that tableview calls rowHeight frequently to calculate the height.which makes the scroll very slow, is there is any efficient way for that ?
I tried to split my data into 9 or 10 sections but still the same!