PSPDFButton


@interface PSPDFButton : UIButton

A collection of useful extensions to UIButton.

  • You can use this property to increase or decrease the hit area of a button. Use negative values to increase and positive values to decrease the touch area. Defaults to UIEdgeInsetsZero.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIEdgeInsets touchAreaInsets;

    Swift

    var touchAreaInsets: UIEdgeInsets { get set }
  • Switch the default button image position. Defaults to NO (image on left).

    Declaration

    Objective-C

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

    Swift

    var positionImageOnRight: Bool { get set }
  • A block that is called when a button action is performed. Setting this property uses UIControlEventTouchUpInside by default.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic)
        PSPDFButtonActionBlock _Nonnull actionBlock;

    Swift

    var actionBlock: PSPDFButtonActionBlock { get set }
  • Sets the actionBlock property to the provided block, registering for events specified by controlEvents.

    Declaration

    Objective-C

    - (void)setActionBlock:(nullable PSPDFButtonActionBlock)actionBlock
          forControlEvents:(UIControlEvents)controlEvents;

    Swift

    func setActionBlock(_ actionBlock: PSPDFButtonActionBlock?, for controlEvents: UIControlEvents)