Some test text!

Page slider

In this document
chevron_rightShowing a thumbnail slider
chevron_rightPopulating with thumbnail images
chevron_rightUpdating the position of the slider
chevron_rightThe Thumbnail Slider Delegate

The ThumbnailSliderViewController class allows the user to quickly navigate through a document. When using the slider control, a small page preview pop will be shown on top of the thumbnail slider.

The thumbnail slider control is part of the Tools library, so make sure you have added the Tools library to your project.

linkShowing a thumbnail slider

To create and set up a thumbnail slider, supply a PTPDFViewCtrl instance to the ThumbnailSliderViewController designated initializer:

linkPopulating with thumbnail images

The thumbnail images shown in the thumbnail slider view controller are generated by the GetThumbAsync: method of the PTPDFViewCtrl class. When ready, the thumbnail images are provided to the pdfviewCtrl's delegate via the pdfViewCtrl:gotThumbAsync:thumbImage: method.

In your class adopting the PTPDFViewCtrlDelegate protocol (usually the same view controller containing the thumbnail slider view controller), add the following:

linkUpdating the position of the slider

When the current page in the associated PTPDFViewCtrl changes, the thumbnail slider must be updated for the new page number. This is done from the pdfViewCtrl:pageNumberChangedFrom:To: method of the PTPDFViewCtrlDelegate protocol:

linkThe Thumbnail Slider Delegate

The ThumbnailSliderViewDelegate protocol allows the adopting class (usually the containing view controller, as in this guide) to be notified when the user is actively using the thumbnail slider. The thumbnail slider already handles changing the current page in response to user actions, but the delegate methods can be used to hide or show other content as appropriate.