PTDocumentSliderViewController


@interface PTDocumentSliderViewController : UIViewController

The PTDocumentSliderViewController class displays a scroll indicator for a PTPDFViewCtrl‘s scroll position. The scroll indicator allows user interaction and is used to change the current page of the associated PTPDFViewCtrl instance.

This view controller is intended to be placed over the PTPDFViewCtrl instance, covering the entire viewport. Unhandled touches in this view controller are forwarded to the views behind.

The scroll indicator adapts for the page presentation mode (scrolling direction) of the PTPDFViewCtrl. For non-continuous page presentation modes, the scroll indicator is displayed at the bottom of this view controller and for continuous page presentation modes, the scroll indicator is displayed along the trailing edge of this view controller.

  • Initializes a newly created PTDocumentSliderViewController instance with the specified pdfViewCtrl.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:
        (nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    the PTPDFViewCtrl instance to track

  • The PTPDFViewCtrl instance tracked by this view controller.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) PTPDFViewCtrl *pdfViewCtrl;

    Swift

    var pdfViewCtrl: PTPDFViewCtrl? { get set }
  • The control that indicates and controls the scroll position and current page of the pdfViewCtrl.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PTDocumentSlider *_Nonnull slider;

    Swift

    var slider: PTDocumentSlider { get }
  • Whether the slider control is currently hidden. The control is shown and hidden automatically in response to PTPDFViewCtrl scroll and page change events.

    The default value is YES.

    Declaration

    Objective-C

    @property (getter=isSliderHidden, assign, readwrite, nonatomic)
        BOOL sliderHidden;

    Swift

    var isSliderHidden: Bool { get set }
  • Sets whether the slider control is currently hidden, optionally animating the change.

    Declaration

    Objective-C

    - (void)setSliderHidden:(BOOL)hidden animated:(BOOL)animated;

    Swift

    func setSliderHidden(_ hidden: Bool, animated: Bool)

    Parameters

    hidden

    Specify YES to hide the control or NO to show it

    animated

    Specify YES if you want to animate the change in visibility or NO if you want the control to appear immediately.

  • The amount that the edges of the slider control should be inset from the edges of this view controller’s root view’s edges when the slider is oriented horizontally.

    Declaration

    Objective-C

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

    Swift

    var horizontalSliderInsets: UIEdgeInsets { get set }
  • The amount that the edges of the slider control should be inset from the edges of this view controller’s root view’s edges when the slider is oriented vertically.

    Declaration

    Objective-C

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

    Swift

    var verticalSliderInsets: UIEdgeInsets { get set }