PSPDFButton

Objective-C


@interface PSPDFButton : UIButton

Swift

class PDFButton : 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 .zero.

    Declaration

    Objective-C

    @property (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 (nonatomic) BOOL positionImageOnRight;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, copy) 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: UIControl.Event)