2016-09-07 22:37:59 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2017-05-12 14:19:12 +00:00
< title > IGListBindingSectionController Class Reference< / title >
2016-09-07 22:37:59 +00:00
< link rel = "stylesheet" type = "text/css" href = "../css/jazzy.css" / >
< link rel = "stylesheet" type = "text/css" href = "../css/highlight.css" / >
< meta charset = 'utf-8' >
< script src = "../js/jquery.min.js" defer > < / script >
< script src = "../js/jazzy.js" defer > < / script >
< / head >
< body >
2017-05-12 14:19:12 +00:00
< a name = "//apple_ref/objc/Class/IGListBindingSectionController" class = "dashAnchor" > < / a >
< a title = "IGListBindingSectionController Class Reference" > < / a >
2016-09-07 22:37:59 +00:00
< header >
< div class = "content-wrapper" >
2017-08-23 21:12:05 +00:00
< p > < a href = "../index.html" > IGListKit Docs< / a > (98% documented)< / p >
2016-09-07 22:37:59 +00:00
< p class = "header-right" > < a href = "https://github.com/Instagram/IGListKit" > < img src = "../img/gh.png" / > View on GitHub< / a > < / p >
< / div >
< / header >
< div class = "content-wrapper" >
< p id = "breadcrumbs" >
< a href = "../index.html" > IGListKit Reference< / a >
< img id = "carat" src = "../img/carat.png" / >
2017-05-12 14:19:12 +00:00
IGListBindingSectionController Class Reference
2016-09-07 22:37:59 +00:00
< / p >
< / div >
< div class = "content-wrapper" >
< nav class = "sidebar" >
< ul class = "nav-groups" >
2016-11-23 20:42:52 +00:00
< li class = "nav-group-name" >
< a href = "../Guides.html" > Guides< / a >
< ul class = "nav-group-tasks" >
2017-05-12 14:19:12 +00:00
< li class = "nav-group-task" >
< a href = "../best-practices-and-faq.html" > Best Practices and FAQ< / a >
< / li >
2018-04-23 16:27:43 +00:00
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../generating-your-models-using-remodel.html" > Generating your models using remodel< / a >
2018-04-23 16:27:43 +00:00
< / li >
2016-11-23 20:42:52 +00:00
< li class = "nav-group-task" >
< a href = "../getting-started.html" > Getting Started< / a >
< / li >
2016-11-28 00:53:20 +00:00
< li class = "nav-group-task" >
< a href = "../iglistdiffable-and-equality.html" > IGListDiffable and Equality< / a >
< / li >
2016-12-27 20:37:57 +00:00
< li class = "nav-group-task" >
< a href = "../installation.html" > Installation< / a >
< / li >
2016-11-23 20:42:52 +00:00
< li class = "nav-group-task" >
< a href = "../migration.html" > Migration< / a >
< / li >
2017-08-23 21:12:05 +00:00
< li class = "nav-group-task" >
< a href = "../modeling-and-binding.html" > Modeling and Binding< / a >
< / li >
2017-05-12 14:19:12 +00:00
< li class = "nav-group-task" >
< a href = "../vision.html" > VISION< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../working-with-core-data.html" > Working with Core Data< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../working-with-uicollectionview.html" > Working with UICollectionView< / a >
< / li >
2016-11-23 20:42:52 +00:00
< / ul >
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-name" >
< a href = "../Classes.html" > Classes< / a >
< ul class = "nav-group-tasks" >
< li class = "nav-group-task" >
< a href = "../Classes/IGListAdapter.html" > IGListAdapter< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListAdapterUpdater.html" > IGListAdapterUpdater< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListBatchUpdateData.html" > IGListBatchUpdateData< / a >
< / li >
< li class = "nav-group-task" >
2017-05-12 14:19:12 +00:00
< a href = "../Classes/IGListBindingSectionController.html" > IGListBindingSectionController< / a >
2016-09-07 22:37:59 +00:00
< / li >
2018-02-06 23:42:25 +00:00
< li class = "nav-group-task" >
< a href = "../Classes/IGListCollectionView.html" > IGListCollectionView< / a >
< / li >
2016-11-22 07:18:30 +00:00
< li class = "nav-group-task" >
2017-05-12 14:19:12 +00:00
< a href = "../Classes/IGListCollectionViewLayout.html" > IGListCollectionViewLayout< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListGenericSectionController.html" > IGListGenericSectionController< / a >
2016-11-22 07:18:30 +00:00
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
< a href = "../Classes/IGListIndexPathResult.html" > IGListIndexPathResult< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListIndexSetResult.html" > IGListIndexSetResult< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListMoveIndex.html" > IGListMoveIndex< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListMoveIndexPath.html" > IGListMoveIndexPath< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes.html#/c:objc(cs)IGListReloadDataUpdater" > IGListReloadDataUpdater< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListSectionController.html" > IGListSectionController< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Classes/IGListSingleSectionController.html" > IGListSingleSectionController< / a >
< / li >
< / ul >
< / li >
< li class = "nav-group-name" >
< a href = "../Constants.html" > Constants< / a >
< ul class = "nav-group-tasks" >
< li class = "nav-group-task" >
< a href = "../Constants.html#/c:@IGListKitVersionNumber" > IGListKitVersionNumber< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Constants.html#/c:@IGListKitVersionString" > IGListKitVersionString< / a >
< / li >
< / ul >
< / li >
< li class = "nav-group-name" >
2018-02-06 23:42:25 +00:00
< a href = "../Enums.html" > Enumerations< / a >
2016-09-07 22:37:59 +00:00
< ul class = "nav-group-tasks" >
2018-02-06 23:42:25 +00:00
< li class = "nav-group-task" >
< a href = "../Enums/IGListAdapterUpdateType.html" > IGListAdapterUpdateType< / a >
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
< a href = "../Enums/IGListDiffOption.html" > IGListDiffOption< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Enums/IGListExperiment.html" > IGListExperiment< / a >
< / li >
< / ul >
< / li >
< li class = "nav-group-name" >
< a href = "../Protocols.html" > Protocols< / a >
< ul class = "nav-group-tasks" >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListAdapterDataSource.html" > IGListAdapterDataSource< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListAdapterDelegate.html" > IGListAdapterDelegate< / a >
< / li >
2018-04-23 16:27:43 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListAdapterMoveDelegate.html" > IGListAdapterMoveDelegate< / a >
< / li >
2019-11-21 00:20:23 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListAdapterPerformanceDelegate.html" > IGListAdapterPerformanceDelegate< / a >
< / li >
2018-02-06 23:42:25 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListAdapterUpdateListener.html" > IGListAdapterUpdateListener< / a >
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListAdapterUpdaterDelegate.html" > IGListAdapterUpdaterDelegate< / a >
< / li >
2017-05-12 14:19:12 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListBatchContext.html" > IGListBatchContext< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListBindable.html" > IGListBindable< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListBindingSectionControllerDataSource.html" > IGListBindingSectionControllerDataSource< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListBindingSectionControllerSelectionDelegate.html" > IGListBindingSectionControllerSelectionDelegate< / a >
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListCollectionContext.html" > IGListCollectionContext< / a >
< / li >
2018-02-06 23:42:25 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListCollectionViewDelegateLayout.html" > IGListCollectionViewDelegateLayout< / a >
< / li >
2019-11-21 00:20:23 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListCollectionViewLayoutCompatible.html" > IGListCollectionViewLayoutCompatible< / a >
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListDiffable.html" > IGListDiffable< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListDisplayDelegate.html" > IGListDisplayDelegate< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListScrollDelegate.html" > IGListScrollDelegate< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListSingleSectionControllerDelegate.html" > IGListSingleSectionControllerDelegate< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListSupplementaryViewSource.html" > IGListSupplementaryViewSource< / a >
< / li >
2018-02-06 23:42:25 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListTransitionDelegate.html" > IGListTransitionDelegate< / a >
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
< a href = "../Protocols/IGListUpdatingDelegate.html" > IGListUpdatingDelegate< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Protocols/IGListWorkingRangeDelegate.html" > IGListWorkingRangeDelegate< / a >
< / li >
< / ul >
< / li >
< li class = "nav-group-name" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html" > Type Definitions< / a >
2016-09-07 22:37:59 +00:00
< ul class = "nav-group-tasks" >
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions/IGListCollectionScrollingTraits.html" > IGListCollectionScrollingTraits< / a >
2016-09-07 22:37:59 +00:00
< / li >
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListCollectionViewBlock" > IGListCollectionViewBlock< / a >
2016-09-07 22:37:59 +00:00
< / li >
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListItemUpdateBlock" > IGListItemUpdateBlock< / a >
2016-09-07 22:37:59 +00:00
< / li >
2016-11-21 23:36:26 +00:00
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListObjectTransitionBlock" > IGListObjectTransitionBlock< / a >
2016-11-21 23:36:26 +00:00
< / li >
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListReloadUpdateBlock" > IGListReloadUpdateBlock< / a >
2016-11-21 23:36:26 +00:00
< / li >
2018-05-01 23:54:35 +00:00
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListSingleSectionController.h@T@IGListSingleSectionCellConfigureBlock" > IGListSingleSectionCellConfigureBlock< / a >
2018-05-01 23:54:35 +00:00
< / li >
2016-09-07 22:37:59 +00:00
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListSingleSectionController.h@T@IGListSingleSectionCellSizeBlock" > IGListSingleSectionCellSizeBlock< / a >
2016-09-07 22:37:59 +00:00
< / li >
< li class = "nav-group-task" >
2019-11-21 00:20:23 +00:00
< a href = "../Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListToObjectBlock" > IGListToObjectBlock< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Type%20Definitions.html#/c:IGListAdapter.h@T@IGListUpdaterCompletion" > IGListUpdaterCompletion< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Type%20Definitions.html#/c:IGListUpdatingDelegate.h@T@IGListUpdatingCompletion" > IGListUpdatingCompletion< / a >
2016-09-07 22:37:59 +00:00
< / li >
< / ul >
< / li >
< li class = "nav-group-name" >
< a href = "../Functions.html" > Functions< / a >
< ul class = "nav-group-tasks" >
< li class = "nav-group-task" >
< a href = "../Functions.html#/c:@F@IGListDiff" > IGListDiff< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Functions.html#/c:@F@IGListDiffExperiment" > IGListDiffExperiment< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Functions.html#/c:@F@IGListDiffPaths" > IGListDiffPaths< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Functions.html#/c:@F@IGListDiffPathsExperiment" > IGListDiffPathsExperiment< / a >
< / li >
< li class = "nav-group-task" >
< a href = "../Functions.html#/c:IGListExperiments.h@F@IGListExperimentEnabled" > IGListExperimentEnabled< / a >
< / li >
< / ul >
< / li >
2019-11-21 00:20:23 +00:00
< li class = "nav-group-name" >
< a href = "../Structs.html" > Structures< / a >
< ul class = "nav-group-tasks" >
< li class = "nav-group-task" >
< a href = "../Structs/IGListCollectionScrollingTraits.html" > IGListCollectionScrollingTraits< / a >
< / li >
< / ul >
< / li >
2016-09-07 22:37:59 +00:00
< / ul >
< / nav >
< article class = "main-content" >
< section >
< section class = "section" >
2017-05-12 14:19:12 +00:00
< h1 > IGListBindingSectionController< / h1 >
2016-09-07 22:37:59 +00:00
< div class = "declaration" >
< div class = "language" >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code >
2019-11-21 00:20:23 +00:00
< span class = "k" > @interface< / span > < span class = "nc" > IGListBindingSectionController< / span > < span class = "o" > < < / span >
< span class = "n" > __covariant< / span > < span class = "n" > ObjectType< / span > < span class = "o" > :< / span > < span class = "n" > id< / span > < span class = "o" > < < / span > < span class = "n" > < a href = "../Protocols/IGListDiffable.html" > IGListDiffable< / a > < / span > < span class = "o" > > > < / span > < span class = "o" > :< / span > < span class = "n" > < a href = "../Classes/IGListSectionController.html" > IGListSectionController< / a > < / span > < / code > < / pre >
2016-09-07 22:37:59 +00:00
< / div >
< / div >
2017-05-12 14:19:12 +00:00
< p > This section controller uses a data source to transform its < q > top level< / q > object into an array of diffable view models.
It then automatically binds each view model to cells via the < code > < a href = "../Protocols/IGListBindable.html" > IGListBindable< / a > < / code > protocol.< / p >
2016-09-07 22:37:59 +00:00
2017-05-12 14:19:12 +00:00
< p > Models used with < code > IGListBindingSectionController< / code > should take special care to always return < code > YES< / code > for identical
objects. That is, any objects with matching < code > -diffIdentifier< / code > s should always be equal, that way the section controller
can create new view models via the data source, create a diff, and update the specific cells that have changed.< / p >
2016-09-07 22:37:59 +00:00
2017-05-12 14:19:12 +00:00
< p > In Objective-C, your < code > -isEqualToDiffableObject:< / code > can simply be:< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "k" > -< / span > < span class = "p" > (< / span > < span class = "n" > BOOL< / span > < span class = "p" > )< / span > < span class = "nf" > isEqualToDiffableObject< / span > < span class = "p" > :(< / span > < span class = "n" > id< / span > < span class = "p" > )< / span > < span class = "nv" > object< / span > < span class = "p" > {< / span >
< span class = "k" > return< / span > < span class = "nb" > YES< / span > < span class = "p" > ;< / span >
< span class = "p" > }< / span >
2017-05-12 14:19:12 +00:00
< / code > < / pre >
< p > In Swift:< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "n" > func< / span > < span class = "n" > isEqual< / span > < span class = "p" > (< / span > < span class = "n" > toDiffableObject< / span > < span class = "n" > object< / span > < span class = "o" > :< / span > < span class = "n" > IGListDiffable< / span > < span class = "p" > ?)< / span > < span class = "o" > -> < / span > < span class = "n" > Bool< / span > < span class = "err" > {< / span >
< span class = "k" > return< / span > < span class = "nb" > true< / span >
< span class = "err" > }< / span >
2017-05-12 14:19:12 +00:00
< / code > < / pre >
< p > Only when < code > -diffIdentifier< / code > s match is object equality compared, so you can assume the class is the same, and the
instance has already been checked.< / p >
2016-09-07 22:37:59 +00:00
< / section >
< section class = "section task-group-section" >
< div class = "task-group" >
< ul >
< li class = "item" >
< div >
< code >
2017-05-12 14:19:12 +00:00
< a name = "/c:objc(cs)IGListBindingSectionController(py)dataSource" > < / a >
< a name = "//apple_ref/objc/Property/dataSource" class = "dashAnchor" > < / a >
< a class = "token" href = "#/c:objc(cs)IGListBindingSectionController(py)dataSource" > dataSource< / a >
2016-09-07 22:37:59 +00:00
< / code >
< / div >
< div class = "height-container" >
< div class = "pointer-container" > < / div >
< section class = "section" >
< div class = "pointer" > < / div >
< div class = "abstract" >
2017-05-12 14:19:12 +00:00
< p > A data source that transforms a top-level object into view models, and returns cells and sizes for given view models.< / p >
2016-11-21 23:36:26 +00:00
2016-09-07 22:37:59 +00:00
< / div >
< div class = "declaration" >
< h4 > Declaration< / h4 >
< div class = "language" >
< p class = "aside-title" > Objective-C< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "k" > @property< / span > < span class = "p" > (< / span > < span class = "n" > readwrite< / span > < span class = "p" > ,< / span > < span class = "n" > nonatomic< / span > < span class = "p" > ,< / span > < span class = "n" > nullable< / span > < span class = "p" > )< / span >
2017-05-12 14:19:12 +00:00
< span class = "n" > id< / span > < span class = "o" > < < / span > < span class = "n" > < a href = "../Protocols/IGListBindingSectionControllerDataSource.html" > IGListBindingSectionControllerDataSource< / a > < / span > < span class = "o" > > < / span >
< span class = "n" > dataSource< / span > < span class = "p" > ;< / span > < / code > < / pre >
2016-09-07 22:37:59 +00:00
< / div >
2019-11-21 00:20:23 +00:00
< div class = "language" >
< p class = "aside-title" > Swift< / p >
< pre class = "highlight swift" > < code > < span class = "k" > weak< / span > < span class = "k" > var< / span > < span class = "nv" > dataSource< / span > < span class = "p" > :< / span > < span class = "kt" > ListBindingSectionControllerDataSource< / span > < span class = "p" > ?< / span > < span class = "p" > {< / span > < span class = "k" > get< / span > < span class = "k" > set< / span > < span class = "p" > }< / span > < / code > < / pre >
< / div >
2016-09-07 22:37:59 +00:00
< / div >
< / section >
< / div >
< / li >
< li class = "item" >
< div >
< code >
2017-05-12 14:19:12 +00:00
< a name = "/c:objc(cs)IGListBindingSectionController(py)selectionDelegate" > < / a >
< a name = "//apple_ref/objc/Property/selectionDelegate" class = "dashAnchor" > < / a >
< a class = "token" href = "#/c:objc(cs)IGListBindingSectionController(py)selectionDelegate" > selectionDelegate< / a >
2016-09-07 22:37:59 +00:00
< / code >
< / div >
< div class = "height-container" >
< div class = "pointer-container" > < / div >
< section class = "section" >
< div class = "pointer" > < / div >
< div class = "abstract" >
2017-05-12 14:19:12 +00:00
< p > A delegate that receives selection events from cells in an < code > IGListBindingSectionController< / code > instance.< / p >
2016-09-07 22:37:59 +00:00
< / div >
< div class = "declaration" >
< h4 > Declaration< / h4 >
< div class = "language" >
< p class = "aside-title" > Objective-C< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "k" > @property< / span > < span class = "p" > (< / span > < span class = "n" > readwrite< / span > < span class = "p" > ,< / span > < span class = "n" > nonatomic< / span > < span class = "p" > ,< / span > < span class = "n" > nullable< / span > < span class = "p" > )< / span >
2017-05-12 14:19:12 +00:00
< span class = "n" > id< / span > < span class = "o" > < < / span > < span class = "n" > < a href = "../Protocols/IGListBindingSectionControllerSelectionDelegate.html" > IGListBindingSectionControllerSelectionDelegate< / a > < / span > < span class = "o" > > < / span >
< span class = "n" > selectionDelegate< / span > < span class = "p" > ;< / span > < / code > < / pre >
2016-09-07 22:37:59 +00:00
< / div >
2019-11-21 00:20:23 +00:00
< div class = "language" >
< p class = "aside-title" > Swift< / p >
< pre class = "highlight swift" > < code > < span class = "k" > weak< / span > < span class = "k" > var< / span > < span class = "nv" > selectionDelegate< / span > < span class = "p" > :< / span > < span class = "kt" > ListBindingSectionControllerSelectionDelegate< / span > < span class = "p" > ?< / span > < span class = "p" > {< / span > < span class = "k" > get< / span > < span class = "k" > set< / span > < span class = "p" > }< / span > < / code > < / pre >
< / div >
2016-09-07 22:37:59 +00:00
< / div >
< / section >
< / div >
< / li >
< li class = "item" >
< div >
< code >
2017-05-12 14:19:12 +00:00
< a name = "/c:objc(cs)IGListBindingSectionController(py)object" > < / a >
< a name = "//apple_ref/objc/Property/object" class = "dashAnchor" > < / a >
< a class = "token" href = "#/c:objc(cs)IGListBindingSectionController(py)object" > object< / a >
2016-09-07 22:37:59 +00:00
< / code >
< / div >
< div class = "height-container" >
< div class = "pointer-container" > < / div >
< section class = "section" >
< div class = "pointer" > < / div >
< div class = "abstract" >
2017-05-12 14:19:12 +00:00
< p > The object currently assigned to the section controller, if any.< / p >
2016-09-07 22:37:59 +00:00
< / div >
< div class = "declaration" >
< h4 > Declaration< / h4 >
< div class = "language" >
< p class = "aside-title" > Objective-C< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "k" > @property< / span > < span class = "p" > (< / span > < span class = "n" > readonly< / span > < span class = "p" > ,< / span > < span class = "n" > strong< / span > < span class = "p" > ,< / span > < span class = "n" > nonatomic< / span > < span class = "p" > ,< / span > < span class = "n" > nullable< / span > < span class = "p" > )< / span > < span class = "n" > ObjectType< / span > < span class = "n" > object< / span > < span class = "p" > ;< / span > < / code > < / pre >
2016-09-07 22:37:59 +00:00
< / div >
2019-11-21 00:20:23 +00:00
< div class = "language" >
< p class = "aside-title" > Swift< / p >
< pre class = "highlight swift" > < code > < span class = "k" > var< / span > < span class = "nv" > object< / span > < span class = "p" > :< / span > < span class = "kt" > ObjectType< / span > < span class = "p" > ?< / span > < span class = "p" > {< / span > < span class = "k" > get< / span > < span class = "p" > }< / span > < / code > < / pre >
< / div >
2016-09-07 22:37:59 +00:00
< / div >
< / section >
< / div >
< / li >
< li class = "item" >
< div >
< code >
2017-05-12 14:19:12 +00:00
< a name = "/c:objc(cs)IGListBindingSectionController(py)viewModels" > < / a >
< a name = "//apple_ref/objc/Property/viewModels" class = "dashAnchor" > < / a >
< a class = "token" href = "#/c:objc(cs)IGListBindingSectionController(py)viewModels" > viewModels< / a >
2016-09-07 22:37:59 +00:00
< / code >
< / div >
< div class = "height-container" >
< div class = "pointer-container" > < / div >
< section class = "section" >
< div class = "pointer" > < / div >
< div class = "abstract" >
2017-05-12 14:19:12 +00:00
< p > The array of view models created from the data source. Values are changed when the top-level object changes or by
calling < code > < a href = "../Classes/IGListBindingSectionController.html#/c:objc(cs)IGListBindingSectionController(im)updateAnimated:completion:" > -updateAnimated:completion:< / a > < / code > manually.< / p >
2016-09-07 22:37:59 +00:00
< / div >
< div class = "declaration" >
< h4 > Declaration< / h4 >
< div class = "language" >
< p class = "aside-title" > Objective-C< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "k" > @property< / span > < span class = "p" > (< / span > < span class = "n" > readonly< / span > < span class = "p" > ,< / span > < span class = "n" > strong< / span > < span class = "p" > ,< / span > < span class = "n" > nonatomic< / span > < span class = "p" > )< / span >
2017-05-12 14:19:12 +00:00
< span class = "n" > NSArray< / span > < span class = "o" > < < / span > < span class = "n" > id< / span > < span class = "o" > < < / span > < span class = "n" > < a href = "../Protocols/IGListDiffable.html" > IGListDiffable< / a > < / span > < span class = "o" > > > < / span > < span class = "o" > *< / span > < span class = "n" > _Nonnull< / span > < span class = "n" > viewModels< / span > < span class = "p" > ;< / span > < / code > < / pre >
2016-09-07 22:37:59 +00:00
< / div >
2019-11-21 00:20:23 +00:00
< div class = "language" >
< p class = "aside-title" > Swift< / p >
< pre class = "highlight swift" > < code > < span class = "k" > var< / span > < span class = "nv" > viewModels< / span > < span class = "p" > :< / span > < span class = "p" > [< / span > < span class = "kt" > ListDiffable< / span > < span class = "p" > ]< / span > < span class = "p" > {< / span > < span class = "k" > get< / span > < span class = "p" > }< / span > < / code > < / pre >
< / div >
2016-09-07 22:37:59 +00:00
< / div >
< / section >
< / div >
< / li >
< li class = "item" >
< div >
< code >
2017-05-12 14:19:12 +00:00
< a name = "/c:objc(cs)IGListBindingSectionController(im)updateAnimated:completion:" > < / a >
< a name = "//apple_ref/objc/Method/-updateAnimated:completion:" class = "dashAnchor" > < / a >
< a class = "token" href = "#/c:objc(cs)IGListBindingSectionController(im)updateAnimated:completion:" > -updateAnimated:completion:< / a >
2016-09-07 22:37:59 +00:00
< / code >
< / div >
< div class = "height-container" >
< div class = "pointer-container" > < / div >
< section class = "section" >
< div class = "pointer" > < / div >
< div class = "abstract" >
2017-05-12 14:19:12 +00:00
< p > Tells the section controller to query for new view models, diff the changes, and update its cells.< / p >
2016-09-07 22:37:59 +00:00
< / div >
< div class = "declaration" >
< h4 > Declaration< / h4 >
< div class = "language" >
< p class = "aside-title" > Objective-C< / p >
2018-02-06 23:42:25 +00:00
< pre class = "highlight objective_c" > < code > < span class = "k" > -< / span > < span class = "p" > (< / span > < span class = "kt" > void< / span > < span class = "p" > )< / span > < span class = "nf" > updateAnimated< / span > < span class = "p" > :(< / span > < span class = "n" > BOOL< / span > < span class = "p" > )< / span > < span class = "nv" > animated< / span >
2017-05-12 14:19:12 +00:00
< span class = "nf" > completion< / span > < span class = "p" > :(< / span > < span class = "n" > nullable< / span > < span class = "kt" > void< / span > < span class = "p" > (< / span > < span class = "o" > ^< / span > < span class = "p" > )(< / span > < span class = "n" > BOOL< / span > < span class = "p" > ))< / span > < span class = "nv" > completion< / span > < span class = "p" > ;< / span > < / code > < / pre >
2016-09-07 22:37:59 +00:00
< / div >
2019-11-21 00:20:23 +00:00
< div class = "language" >
< p class = "aside-title" > Swift< / p >
< pre class = "highlight swift" > < code > < span class = "kd" > func< / span > < span class = "nf" > update< / span > < span class = "p" > (< / span > < span class = "nv" > animated< / span > < span class = "p" > :< / span > < span class = "kt" > Bool< / span > < span class = "p" > ,< / span > < span class = "nv" > completion< / span > < span class = "p" > :< / span > < span class = "p" > ((< / span > < span class = "kt" > Bool< / span > < span class = "p" > )< / span > < span class = "o" > -> < / span > < span class = "kt" > Void< / span > < span class = "p" > )?< / span > < span class = "o" > =< / span > < span class = "kc" > nil< / span > < span class = "p" > )< / span > < / code > < / pre >
< / div >
2016-09-07 22:37:59 +00:00
< / div >
< div >
< h4 > Parameters< / h4 >
< table class = "graybox" >
< tbody >
< tr >
< td >
< code >
2017-05-12 14:19:12 +00:00
< em > animated< / em >
2016-09-07 22:37:59 +00:00
< / code >
< / td >
< td >
< div >
2017-05-12 14:19:12 +00:00
< p > A flag indicating if the transition should be animated or not.< / p >
< / div >
< / td >
< / tr >
< tr >
< td >
< code >
< em > completion< / em >
< / code >
< / td >
< td >
< div >
< p > An optional completion block executed after updates finish. Parameter is YES if updates were applied.< / p >
2016-09-07 22:37:59 +00:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / section >
< / div >
< / li >
2019-11-21 00:20:23 +00:00
< li class = "item" >
< div >
< code >
< a name = "/c:objc(cs)IGListBindingSectionController(im)moveObjectFromIndex:toIndex:" > < / a >
< a name = "//apple_ref/objc/Method/-moveObjectFromIndex:toIndex:" class = "dashAnchor" > < / a >
< a class = "token" href = "#/c:objc(cs)IGListBindingSectionController(im)moveObjectFromIndex:toIndex:" > -moveObjectFromIndex:toIndex:< / a >
< / code >
< / div >
< div class = "height-container" >
< div class = "pointer-container" > < / div >
< section class = "section" >
< div class = "pointer" > < / div >
< div class = "abstract" >
< p > Notifies the section that a list object should move within a section as the result of interactive reordering.< / p >
< div class = "aside aside-note" >
< p class = "aside-title" > Note< / p >
< p > this method must be implemented if interactive reordering is enabled. To ensure updating the internal viewModels array, < strong > calling super is required< / strong > , preferably before your own implementation.< / p >
< / div >
< / div >
< div class = "declaration" >
< h4 > Declaration< / h4 >
< div class = "language" >
< p class = "aside-title" > Objective-C< / p >
< pre class = "highlight objective_c" > < code > < span class = "k" > -< / span > < span class = "p" > (< / span > < span class = "kt" > void< / span > < span class = "p" > )< / span > < span class = "nf" > moveObjectFromIndex< / span > < span class = "p" > :(< / span > < span class = "n" > NSInteger< / span > < span class = "p" > )< / span > < span class = "nv" > sourceIndex< / span >
< span class = "nf" > toIndex< / span > < span class = "p" > :(< / span > < span class = "n" > NSInteger< / span > < span class = "p" > )< / span > < span class = "nv" > destinationIndex< / span > < span class = "p" > ;< / span > < / code > < / pre >
< / div >
< div class = "language" >
< p class = "aside-title" > Swift< / p >
< pre class = "highlight swift" > < code > < span class = "kd" > func< / span > < span class = "nf" > moveObject< / span > < span class = "p" > (< / span > < span class = "n" > from< / span > < span class = "nv" > sourceIndex< / span > < span class = "p" > :< / span > < span class = "kt" > Int< / span > < span class = "p" > ,< / span > < span class = "n" > to< / span > < span class = "nv" > destinationIndex< / span > < span class = "p" > :< / span > < span class = "kt" > Int< / span > < span class = "p" > )< / span > < / code > < / pre >
< / div >
< / div >
< div >
< h4 > Parameters< / h4 >
< table class = "graybox" >
< tbody >
< tr >
< td >
< code >
< em > sourceIndex< / em >
< / code >
< / td >
< td >
< div >
< p > The starting index of the object.< / p >
< / div >
< / td >
< / tr >
< tr >
< td >
< code >
< em > destinationIndex< / em >
< / code >
< / td >
< td >
< div >
< p > The ending index of the object.< / p >
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / section >
< / div >
< / li >
2016-09-07 22:37:59 +00:00
< / ul >
< / div >
< / section >
< / section >
< section id = "footer" >
2019-11-21 00:20:23 +00:00
< p > © 2019 < a class = "link" href = "https://twitter.com/fbOpenSource" target = "_blank" rel = "external" > Instagram< / a > . All rights reserved. (Last updated: 2019-11-20)< / p >
< p > Generated by < a class = "link" href = "https://github.com/realm/jazzy" target = "_blank" rel = "external" > jazzy ♪♫ v0.12.0< / a > , a < a class = "link" href = "https://realm.io" target = "_blank" rel = "external" > Realm< / a > project.< / p >
2016-09-07 22:37:59 +00:00
< / section >
< / article >
< / div >
< / body >
< / div >
< / html >