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 (nonatomic, assign, unsafe_unretained, readwrite) 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 (nonatomic, assign, unsafe_unretained, readwrite, getter=isEditing)
        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
                pageLabel:(nullable NSString *)pageLabel;

    Swift

    func setPageNumber(_ pageNumber: Int, pageLabel: String?)

    Parameters

    pageNumber

    The page number.

    pageLabel

    The page label.

  • Updates the state of the cell.

    Declaration

    Objective-C

    - (void)setPageNumber:(NSInteger)pageNumber
                pageLabel:(nullable NSString *)pageLabel
            isCurrentPage:(BOOL)isCurrent
                isEditing:(BOOL)isEditing
                isChecked:(BOOL)isChecked;

    Swift

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

    Parameters

    pageNumber

    The page number.

    pageLabel

    The page label.

    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.