PSPDFAvoidingScrollView

Objective-C


@interface PSPDFAvoidingScrollView : UIScrollView

Swift

class AvoidingScrollView : 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 (nonatomic, readonly, getter=isAvoidingKeyboard) BOOL avoidingKeyboard;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) 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 (nonatomic, readonly) 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 (nonatomic, assign, unsafe_unretained, readwrite) BOOL enableAvoidance;

    Swift

    var enableAvoidance: Bool { get set }