PSPDFAvoidingScrollView


@interface PSPDFAvoidingScrollView : UIScrollView

Scroll view subclass that listens to keyboard and half modal events and moves itself up accordingly.

Note

delegate also queries methods listed in PSPDFAvoidingScrollViewDelegate.
  • YES if currently avoiding the keyboard or half modal.

    Declaration

    Objective-C

    @property (readonly, getter=isAvoidingKeyboard, nonatomic) BOOL avoidingKeyboard;

    Swift

    var isAvoidingKeyboard: Bool { get }
  • YES if a half modal view controller is currently visible.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isHalfModalVisible;

    Swift

    var isHalfModalVisible: Bool { get }
  • Return YES if we have a first responder inside the scrollView that is a text input.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL firstResponderIsTextInput;

    Swift

    var firstResponderIsTextInput: Bool { get }
  • Enable/Disable avoidance features. Defaults to YES.

    Warning

    Don’t change this while isAvoiding is YES.

    Declaration

    Objective-C

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

    Swift

    var enableAvoidance: Bool { get set }