PSPDFToolbarButton


@interface PSPDFToolbarButton : PSPDFButton

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

  • Styles the provided image and sets it as the button image for several button states.

    Declaration

    Objective-C

    - (void)setImage:(nullable UIImage *)image;

    Swift

    func setImage(_ image: UIImage?)
  • 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 (assign, readwrite, 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 (getter=isCollapsible, assign, readwrite, nonatomic) 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.f to use the default toolbar length (the default).

    Declaration

    Objective-C

    @property (assign, readwrite, 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 (getter=isFlexible, assign, readwrite, nonatomic) 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 (readwrite, copy, nonatomic, nullable) void (^)(UIColor *_Nonnull)
        tintColorDidChangeBlock;

    Swift

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