PTThumbnailViewCell

@interface PTThumbnailViewCell : UICollectionViewCell

A cell for use by the PTThumbnailsViewController.

  • Whether night mode is enabled and the cell’s colors should be adjusted.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL nightMode;

    Swift

    var nightMode: Bool { get set }
  • Whether the cell is in an editable state. The default value is NO.

    This property is set by the thumbnails view controller when it enters editing mode.

    Declaration

    Objective-C

    @property (getter=isEditing, assign, readwrite, nonatomic) BOOL editing;

    Swift

    var isEditing: Bool { get set }
  • Toggles the receiver into and out of editing mode.

    Declaration

    Objective-C

    - (void)setEditing:(BOOL)editing animated:(BOOL)animated;

    Swift

    func setEditing(_ editing: Bool, animated: Bool)

    Parameters

    editing

    YES to enter editing mode, NO to leave it.

    animated

    YES to animate the appearance or disappearance of editing-related controls, NO to make the transition immediate.

  • Updates the page number of the cell.

    Declaration

    Objective-C

    - (void)setPageNumber:(NSInteger)pageNumber;

    Swift

    func setPageNumber(_ pageNumber: Int)

    Parameters

    pageNumber

    The page number.

  • Updates the state of the cell.

    Declaration

    Objective-C

    - (void)setPageNumber:(NSInteger)pageNumber
            isCurrentPage:(BOOL)isCurrent
                isEditing:(BOOL)isEditing
                isChecked:(BOOL)isChecked;

    Swift

    func setPageNumber(_ pageNumber: Int, isCurrentPage isCurrent: Bool, isEditing: Bool, isChecked: Bool)

    Parameters

    pageNumber

    The page number.

    isCurrent

    Whether the page number is the current page.

    isEditing

    Whether the containing view controller is in edit mode.

    isChecked

    Whether the cell is selected/checked.

  • Associates a thumbnail image with a page number

    Declaration

    Objective-C

    - (void)setThumbnail:(nullable UIImage *)image forPage:(NSInteger)pageNum;

    Swift

    func setThumbnail(_ image: UIImage?, forPage pageNum: Int)

    Parameters

    image

    The image of the page.

    pageNum

    The page number of the page.