I do not want animation in the begin updates, end updates block for uitableview?

前端 未结 6 1177
执念已碎
执念已碎 2020-12-22 22:43

I have a UITableView that is using a custom table cell and each cell has a UIWebView.

Because UIWebView took along time to load, i want to avoid reloading them at al

6条回答
  •  太阳男子
    2020-12-22 23:06

    I wanted to updated the cell height for section 5 and following code worked for me:

    UiView.setAnimationsEnabled(False)
    self.productTableView.reloadSections(NSIndexSet(index: SectionType.ProductDescription.hashValue), withRowAnimation: UITableViewRowAnimation.None)
    self.productTableView.scrollToRowAtIndexPath(NSIndexPath(forRow: 0, inSection: 5), atScrollPosition: UITableViewScrollPosition.Bottom, animated: false)
    UIView.setAnimationsEnabled(true)
    

提交回复
热议问题