PSPDFToolbarButton

Objective-C


@interface PSPDFToolbarButton : PSPDFButton <PSPDFOverridable>

Swift

class ToolbarButton : PDFButton, Overridable

A UIButton subclass that mimic the appearance of plain style UIBarButtonItems.

  • Sets the main button image. Sets it as the button image for several button states.

    Declaration

    Objective-C

    @property (nonatomic, nullable) UIImage *image;

    Swift

    var image: UIImage? { get set }
  • When set the button will automatically switch to the small image if its height is less or equal to 32pt.

    Declaration

    Objective-C

    @property (nonatomic, nullable) UIImage *smallSizeImage;

    Swift

    var smallSizeImage: UIImage? { get set }
  • Toggles the appearance between the highlighted and normal state.

    Declaration

    Objective-C

    - (void)styleForHighlightedState:(BOOL)highlighted;

    Swift

    func style(forHighlightedState highlighted: Bool)
  • General purpose user data storage.

    Declaration

    Objective-C

    @property (nonatomic, nullable) id userInfo;

    Swift

    var userInfo: Any? { get set }
  • Allows animated transitions between the enabled and disabled appearance.

    Declaration

    Objective-C

    - (void)setEnabled:(BOOL)enabled animated:(BOOL)animated;

    Swift

    func setEnabled(_ enabled: Bool, animated: Bool)
  • Designates the button to be collapsible into one item, if toolbar space is limited. Defaults to YES.

    Declaration

    Objective-C

    @property (nonatomic, getter=isCollapsible) BOOL collapsible;

    Swift

    var isCollapsible: Bool { get set }
  • The fixed length value. Will become the button width or height depending on the toolbar orientation. Set to -1. to use the default toolbar length (the default).

    Declaration

    Objective-C

    @property (nonatomic) CGFloat length;

    Swift

    var length: CGFloat { get set }
  • Automatically sets the length to the intrinsic size width.

    Declaration

    Objective-C

    - (void)setLengthToFit;

    Swift

    func setLengthToFit()
  • If YES, the actual button space will be computed dynamically by counting all button instances and dividing the remaining available toolbar space with that number. Otherwise the length will be taken from the length property. Defaults to NO.

    Declaration

    Objective-C

    @property (nonatomic, getter=isFlexible) BOOL flexible;

    Swift

    var isFlexible: Bool { get set }
  • Called whenever the tint color changes. Use to update tint color dependent content (like a tint color based custom drawn image or attributed text).

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^)(UIColor *_Nonnull) tintColorDidChangeBlock;

    Swift

    var tintColorDidChangeBlock: ((UIColor) -> Void)? { get set }