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 specifiedpdfViewCtrl
.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 (nonatomic, strong, 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 (nonatomic, readonly) PTDocumentSlider *_Nonnull slider;
Swift
var slider: PTDocumentSlider { get }
-
Whether the
slider
control is currently hidden. The control is shown and hidden automatically in response toPTPDFViewCtrl
scroll and page change events.The default value is
YES
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSliderHidden) BOOL sliderHidden;
Swift
var isSliderHidden: Bool { get set }
-
Control how long it takes hide the slider view.
The default value is 1 second.
Declaration
Objective-C
@property (nonatomic) NSTimeInterval hidingInterval;
Swift
var hidingInterval: TimeInterval { 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 orNO
to show itanimated
Specify
YES
if you want to animate the change in visibility orNO
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 (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 (nonatomic) UIEdgeInsets verticalSliderInsets;
Swift
var verticalSliderInsets: UIEdgeInsets { get set }
-
Whether this view controller automatically hides the horizontal and/or vertical scroll indicators of the
pdfViewCtrl
to avoid theslider
.The default value of this property is
YES
.Declaration
Objective-C
@property (nonatomic) BOOL hidesPDFViewCtrlScrollIndicators;
Swift
var hidesPDFViewCtrlScrollIndicators: Bool { get set }