IGListSectionController

@interface IGListSectionController : NSObject

The base class for section controllers used in a list. This class is intended to be subclassed.

  • The view controller housing the adapter that created this section controller.

    Note

    Use this view controller to push, pop, present, or do other custom transitions.

    Warning

    It is considered very bad practice to cast this to a known view controller and call methods on it other than for navigations and transitions.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) UIViewController *viewController;
  • A context object for interacting with the collection.

    Use this property for accessing the collection size, dequeing cells, reloading, inserting, deleting, etc.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id<IGListCollectionContext>
        collectionContext;

    Swift

    weak var collectionContext: AnyObject? { get }
  • Returns YES if the section controller is the first section in the list, NO otherwise.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) BOOL isFirstSection;

    Swift

    var isFirstSection: Int32 { get }
  • Returns YES if the section controller is the last section in the list, NO otherwise.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) BOOL isLastSection;

    Swift

    var isLastSection: Int32 { get }
  • The margins used to lay out content in the section controller.

    See

    -[UICollectionViewFlowLayout sectionInset].

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIEdgeInsets inset;

    Swift

    var inset: Int32 { get set }
  • The minimum spacing to use between rows of items.

    See

    -[UICollectionViewFlowLayout minimumLineSpacing].

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat minimumLineSpacing;

    Swift

    var minimumLineSpacing: Int32 { get set }
  • The minimum spacing to use between items in the same row.

    See

    -[UICollectionViewFlowLayout minimumInteritemSpacing].

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat minimumInteritemSpacing;

    Swift

    var minimumInteritemSpacing: Int32 { get set }
  • The supplementary view source for the section controller. Can be nil.

    Note

    You may wish to return self if your section controller implements this protocol.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<IGListSupplementaryViewSource>
        supplementaryViewSource;

    Swift

    weak var supplementaryViewSource: AnyObject? { get set }

    Return Value

    An object that conforms to IGListSupplementaryViewSource or nil.

  • An object that handles display events for the section controller. Can be nil.

    Note

    You may wish to return self if your section controller implements this protocol.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<IGListDisplayDelegate>
        displayDelegate;

    Swift

    weak var displayDelegate: AnyObject? { get set }

    Return Value

    An object that conforms to IGListDisplayDelegate or nil.

  • An object that handles working range events for the section controller. Can be nil.

    Note

    You may wish to return self if your section controller implements this protocol.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<IGListWorkingRangeDelegate>
        workingRangeDelegate;

    Swift

    weak var workingRangeDelegate: AnyObject? { get set }

    Return Value

    An object that conforms to IGListWorkingRangeDelegate or nil.

  • An object that handles display events for the section controller. Can be nil.

    Note

    You may wish to return self if your section controller implements this protocol.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<IGListScrollDelegate>
        scrollDelegate;

    Swift

    weak var scrollDelegate: AnyObject? { get set }

    Return Value

    An object that conforms to IGListDisplayDelegate or nil.