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) BOOL nightMode;
  • The page label’s background view

    Declaration

    Objective-C

    @property (nonatomic, strong) UIView *_Nonnull labelBackgroundView;
  • 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, getter=isEditing) BOOL editing;
  • Toggles the receiver into and out of editing mode.

    Declaration

    Objective-C

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

    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;

    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;

    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;

    Parameters

    image

    The image of the page.

    pageNum

    The page number of the page.