diff --git a/Source/IGListAdapterUpdateListener.h b/Source/IGListAdapterUpdateListener.h index ddfe96986..9c8aad2bd 100644 --- a/Source/IGListAdapterUpdateListener.h +++ b/Source/IGListAdapterUpdateListener.h @@ -32,6 +32,9 @@ typedef NS_ENUM(NSInteger, IGListAdapterUpdateType) { IGListAdapterUpdateTypeItemUpdates, }; +/** + Conform to this protocol to receive events about `IGListAdapter` updates. + */ NS_SWIFT_NAME(ListAdapterUpdateListener) @protocol IGListAdapterUpdateListener diff --git a/Source/IGListBindingSectionControllerSelectionDelegate.h b/Source/IGListBindingSectionControllerSelectionDelegate.h index ae5992e54..5eef5aa6c 100644 --- a/Source/IGListBindingSectionControllerSelectionDelegate.h +++ b/Source/IGListBindingSectionControllerSelectionDelegate.h @@ -30,6 +30,8 @@ NS_SWIFT_NAME(ListBindingSectionControllerSelectionDelegate) didSelectItemAtIndex:(NSInteger)index viewModel:(id)viewModel; +@optional + /** Tells the delegate that a cell at a given index was deselected. @@ -39,7 +41,6 @@ NS_SWIFT_NAME(ListBindingSectionControllerSelectionDelegate) @note Method is `@optional` until the 4.0.0 release where it will become required. */ -@optional - (void)sectionController:(IGListBindingSectionController *)sectionController didDeselectItemAtIndex:(NSInteger)index viewModel:(id)viewModel; @@ -51,7 +52,6 @@ NS_SWIFT_NAME(ListBindingSectionControllerSelectionDelegate) @param index The index of the highlighted cell. @param viewModel The view model that was bound to the cell. */ -@optional - (void)sectionController:(IGListBindingSectionController *)sectionController didHighlightItemAtIndex:(NSInteger)index viewModel:(id)viewModel; @@ -63,7 +63,6 @@ NS_SWIFT_NAME(ListBindingSectionControllerSelectionDelegate) @param index The index of the unhighlighted cell. @param viewModel The view model that was bound to the cell. */ -@optional - (void)sectionController:(IGListBindingSectionController *)sectionController didUnhighlightItemAtIndex:(NSInteger)index viewModel:(id)viewModel; diff --git a/Source/IGListCollectionView.h b/Source/IGListCollectionView.h index 5fb505954..c9e9a961d 100644 --- a/Source/IGListCollectionView.h +++ b/Source/IGListCollectionView.h @@ -39,6 +39,9 @@ NS_SWIFT_NAME(ListCollectionView) */ - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)collectionViewLayout NS_UNAVAILABLE; +/** + :nodoc: + */ - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE; @end diff --git a/Source/IGListScrollDelegate.h b/Source/IGListScrollDelegate.h index 6ce78366f..f2546e21e 100644 --- a/Source/IGListScrollDelegate.h +++ b/Source/IGListScrollDelegate.h @@ -46,6 +46,8 @@ NS_SWIFT_NAME(ListScrollDelegate) */ - (void)listAdapter:(IGListAdapter *)listAdapter didEndDraggingSectionController:(IGListSectionController *)sectionController willDecelerate:(BOOL)decelerate; +@optional + /** Tells the delegate that the section controller did end decelerating on screen. @@ -54,7 +56,6 @@ NS_SWIFT_NAME(ListScrollDelegate) @note This method is `@optional` until the next breaking-change release. */ -@optional - (void)listAdapter:(IGListAdapter *)listAdapter didEndDeceleratingSectionController:(IGListSectionController *)sectionController; @end diff --git a/Source/IGListSingleSectionController.h b/Source/IGListSingleSectionController.h index 5b3627143..745d45062 100644 --- a/Source/IGListSingleSectionController.h +++ b/Source/IGListSingleSectionController.h @@ -53,6 +53,8 @@ NS_SWIFT_NAME(ListSingleSectionControllerDelegate) - (void)didSelectSectionController:(IGListSingleSectionController *)sectionController withObject:(id)object; +@optional + /** Tells the delegate that the section controller was deselected. @@ -61,7 +63,6 @@ NS_SWIFT_NAME(ListSingleSectionControllerDelegate) @note Method is `@optional` until the 4.0.0 release where it will become required. */ -@optional - (void)didDeselectSectionController:(IGListSingleSectionController *)sectionController withObject:(id)object; diff --git a/docs/Classes.html b/docs/Classes.html index 2ecb9d343..9ae1dfeb3 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -74,6 +74,9 @@ + @@ -118,8 +121,11 @@ + @@ -119,8 +122,11 @@ + @@ -119,8 +122,11 @@ +
  • +
    + + + + -didModifySection: + +
    +
    +
    +
    +
    +
    +

    Notify the layout that a specific section was modified before invalidation. Used to optimize layout re-calculation.

    +
    +

    Note

    +

    When updating a collection view (ex: calling -insertSections), -invalidateLayoutWithContext gets called on +the layout object. However, the invalidation context doesn’t provide details on which index paths are being modified, +which typically forces a full layout re-calculation. We can use this method to keep track of which section actually +needs to be updated on the following -invalidateLayoutWithContext. See IGListCollectionView.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Objective-C

    +
    - (void)didModifySection:(NSInteger)modifiedSection;
    + +
    +
    +

    Swift

    +
    func didModifySection(_ modifiedSection: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + modifiedSection + + +
    +

    The section that was modified.

    +
    +
    +
    +
    +
    +
  • @@ -387,7 +461,7 @@

    Declaration

    Declaration

    Objective-C

    -
    - (nonnull instancetype)
    +                          
    - (nonnull instancetype)
     initWithStickyHeaders:(BOOL)stickyHeaders
           scrollDirection:(UICollectionViewScrollDirection)scrollDirection
           topContentInset:(CGFloat)topContentInset
    @@ -396,7 +470,7 @@ 

    Declaration

    Swift

    -
    init(stickyHeaders: Bool, scrollDirection: UICollectionViewScrollDirection, topContentInset: CGFloat, stretchToEdge: Bool)
    +
    init(stickyHeaders: Bool, scrollDirection: UICollectionViewScrollDirection, topContentInset: CGFloat, stretchToEdge: Bool)
    @@ -482,14 +556,14 @@

    Return Value

    Declaration

    Objective-C

    -
    - (nonnull instancetype)initWithStickyHeaders:(BOOL)stickyHeaders
    +                          
    - (nonnull instancetype)initWithStickyHeaders:(BOOL)stickyHeaders
                                   topContentInset:(CGFloat)topContentInset
                                     stretchToEdge:(BOOL)stretchToEdge;

    Swift

    -
    convenience init(stickyHeaders: Bool, topContentInset: CGFloat, stretchToEdge: Bool)
    +
    convenience init(stickyHeaders: Bool, topContentInset: CGFloat, stretchToEdge: Bool)
    @@ -548,8 +622,8 @@

    Return Value

    diff --git a/docs/Classes/IGListGenericSectionController.html b/docs/Classes/IGListGenericSectionController.html index 159764603..8f5b3ff6b 100644 --- a/docs/Classes/IGListGenericSectionController.html +++ b/docs/Classes/IGListGenericSectionController.html @@ -75,6 +75,9 @@
  • + @@ -119,8 +122,11 @@ + @@ -119,8 +122,11 @@ + + +
    +
      +
    • + +
      +
      +
      +
      +
      +

      Conform to IGListCollectionViewDelegateLayout to provide customized layout information for a collection view.

      + + See more +
      +
      +

      Declaration

      +
      +

      Objective-C

      +
      @protocol
      +    IGListCollectionViewDelegateLayout <UICollectionViewDelegateFlowLayout>

      Swift

      -
      protocol ListCollectionContext : NSObjectProtocol
      +
      protocol IGListCollectionViewDelegateLayout : UICollectionViewDelegateFlowLayout
      @@ -555,12 +645,12 @@

      Declaration

      Declaration

      Objective-C

      -
      @protocol IGListDiffable
      +
      @protocol IGListDiffable

      Swift

      -
      protocol ListDiffable
      +
      protocol ListDiffable
      @@ -592,12 +682,12 @@

      Declaration

      Declaration

      Objective-C

      -
      @protocol IGListDisplayDelegate <NSObject>
      +
      @protocol IGListDisplayDelegate <NSObject>

      Swift

      -
      protocol ListDisplayDelegate : NSObjectProtocol
      +
      protocol ListDisplayDelegate : NSObjectProtocol
    @@ -629,12 +719,12 @@

    Declaration

    Declaration

    Objective-C

    -
    @protocol IGListScrollDelegate <NSObject>
    +
    @protocol IGListScrollDelegate <NSObject>

    Swift

    -
    protocol ListScrollDelegate : NSObjectProtocol
    +
    protocol ListScrollDelegate : NSObjectProtocol
    @@ -666,12 +756,12 @@

    Declaration

    Declaration

    Objective-C

    -
    @protocol IGListSingleSectionControllerDelegate <NSObject>
    +
    @protocol IGListSingleSectionControllerDelegate <NSObject>

    Swift

    -
    protocol ListSingleSectionControllerDelegate : NSObjectProtocol
    +
    protocol ListSingleSectionControllerDelegate : NSObjectProtocol
    @@ -705,12 +795,49 @@

    Declaration

    Declaration

    Objective-C

    -
    @protocol IGListSupplementaryViewSource <NSObject>
    +
    @protocol IGListSupplementaryViewSource <NSObject>
    + +
    +
    +

    Swift

    +
    protocol ListSupplementaryViewSource : NSObjectProtocol
    + +
    + + + + + + +
    +
      +
    • + +
      +
      +
      +
      +
      +

      Conform to IGListTransitionDelegate to provide customized layout information for a collection view.

      + + See more +
      +
      +

      Declaration

      +
      +

      Objective-C

      +
      @protocol IGListTransitionDelegate <NSObject>

      Swift

      -
      protocol ListSupplementaryViewSource : NSObjectProtocol
      +
      protocol IGListTransitionDelegate
      @@ -743,12 +870,12 @@

      Declaration

      Declaration

      Objective-C

      -
      @protocol IGListUpdatingDelegate <NSObject>
      +
      @protocol IGListUpdatingDelegate <NSObject>

      Swift

      -
      protocol ListUpdatingDelegate : NSObjectProtocol
      +
      protocol ListUpdatingDelegate : NSObjectProtocol
      @@ -783,12 +910,12 @@

      Declaration

      Declaration

      Objective-C

      -
      @protocol IGListWorkingRangeDelegate <NSObject>
      +
      @protocol IGListWorkingRangeDelegate <NSObject>

      Swift

      -
      protocol ListWorkingRangeDelegate : NSObjectProtocol
      +
      protocol ListWorkingRangeDelegate : NSObjectProtocol
    @@ -800,8 +927,8 @@

    Declaration

    diff --git a/docs/Protocols/IGListAdapterDataSource.html b/docs/Protocols/IGListAdapterDataSource.html index 6fd87ccfa..1c5ab2cad 100644 --- a/docs/Protocols/IGListAdapterDataSource.html +++ b/docs/Protocols/IGListAdapterDataSource.html @@ -75,6 +75,9 @@ + @@ -119,8 +122,11 @@ + @@ -119,8 +122,11 @@