UITableView
public extension UITableView
-
Applies multiple animated updates in stages using
StagedChangeset.Note
There are combination of changes that crash when applied simultaneously in
performBatchUpdates. Assumes thatStagedChangesethas a minimum staged changesets to avoid it. The data of the data-source needs to be updated synchronously beforeperformBatchUpdatesin every stages.Declaration
Swift
func reload<C>( using stagedChangeset: StagedChangeset<C>, with animation: @autoclosure () -> RowAnimation, interrupt: ((Changeset<C>) -> Bool)? = nil, setData: (C) -> Void )Parameters
stagedChangesetA staged set of changes.
animationAn option to animate the updates.
interruptA closure that takes an changeset as its argument and returns
trueif the animated updates should be stopped and performed reloadData. Default is nil.setDataA closure that takes the collection as a parameter. The collection should be set to data-source of UITableView.
-
reload(using:deleteSectionsAnimation:insertSectionsAnimation:reloadSectionsAnimation:deleteRowsAnimation:insertRowsAnimation:reloadRowsAnimation:interrupt:setData:)Applies multiple animated updates in stages using
StagedChangeset.Note
There are combination of changes that crash when applied simultaneously in
performBatchUpdates. Assumes thatStagedChangesethas a minimum staged changesets to avoid it. The data of the data-source needs to be updated synchronously beforeperformBatchUpdatesin every stages.Declaration
Swift
func reload<C>( using stagedChangeset: StagedChangeset<C>, deleteSectionsAnimation: @autoclosure () -> RowAnimation, insertSectionsAnimation: @autoclosure () -> RowAnimation, reloadSectionsAnimation: @autoclosure () -> RowAnimation, deleteRowsAnimation: @autoclosure () -> RowAnimation, insertRowsAnimation: @autoclosure () -> RowAnimation, reloadRowsAnimation: @autoclosure () -> RowAnimation, interrupt: ((Changeset<C>) -> Bool)? = nil, setData: (C) -> Void )Parameters
stagedChangesetA staged set of changes.
deleteSectionsAnimationAn option to animate the section deletion.
insertSectionsAnimationAn option to animate the section insertion.
reloadSectionsAnimationAn option to animate the section reload.
deleteRowsAnimationAn option to animate the row deletion.
insertRowsAnimationAn option to animate the row insertion.
reloadRowsAnimationAn option to animate the row reload.
interruptA closure that takes an changeset as its argument and returns
trueif the animated updates should be stopped and performed reloadData. Default is nil.setDataA closure that takes the collection as a parameter. The collection should be set to data-source of UITableView.
View on GitHub
UITableView Extension Reference