PTReflowViewController
@interface PTReflowViewController
: UIViewController <PTOverridable, UIPageViewControllerDelegate,
UIPageViewControllerDataSource>
Displays reflowed page content from a PDF document.
-
Initializes a newly created reflow view controller that scrolls horizontally.
Declaration
Objective-C
- (nonnull instancetype)initWithPDFViewCtrl: (nonnull PTPDFViewCtrl *)pdfViewCtrl;
Swift
convenience init(pdfViewCtrl: PTPDFViewCtrl)
Parameters
pdfViewCtrl
the PDFViewCtrl instance that the control coordinates with
Return Value
The initialized reflow view controller.
-
Initializes a newly created reflow view controller.
Declaration
Objective-C
- (nonnull instancetype)initWithPDFViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl scrollingDirection: (PTReflowViewControllerScrollingDirection) scrollingDirection;
Swift
init(pdfViewCtrl: PTPDFViewCtrl, scrollingDirection: PTReflowViewControllerScrollingDirection)
Parameters
pdfViewCtrl
the PDFViewCtrl instance that the control coordinates with
scrollingDirection
the scrolling direction of the reflow view controller
Return Value
The initialized reflow view controller.
-
The delegate object.
Declaration
Objective-C
@property (nonatomic, weak, readwrite) id<PTReflowViewControllerDelegate> _Nullable delegate;
Swift
weak var delegate: PTReflowViewControllerDelegate? { get set }
-
The scrolling direction of the reflow view controller. The default value is
PTReflowViewControllerScrollingDirectionHorizontal
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) PTReflowViewControllerScrollingDirection scrollingDirection;
Swift
var scrollingDirection: PTReflowViewControllerScrollingDirection { get set }
-
The
UIPageViewController
used to show each page of reflowed content.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIPageViewController *_Nonnull pageViewController;
Swift
var pageViewController: UIPageViewController { get }
-
The current page number. This is initially set to the provided
PTPDFViewCtrl
‘s current page.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) int pageNumber;
Swift
var pageNumber: Int32 { get set }
-
Sets the current page number of the reflow view controller.
Declaration
Objective-C
- (void)setPageNumber:(int)pageNumber animated:(BOOL)animated;
Swift
func setPageNumber(_ pageNumber: Int32, animated: Bool)
Parameters
pageNumber
the new page number
animated
whether to animate the change in page number
-
The scale factor for the reflowed text content. The default value is 1.0.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) CGFloat scale;
Swift
var scale: CGFloat { get set }
-
Whether tapping on the edge of a page changes the page. The default value is
NO
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) BOOL turnPageOnTap;
Swift
var turnPageOnTap: Bool { get set }
-
How to reflow the PDF content. The default value is
PTReflowModeTextAndRawImages
.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite) PTReflowMode reflowMode;
Swift
var reflowMode: PTReflowMode { get set }
-
Overrides the font to use for reflowed content.
If this property is nil, the default PDF font will be used.
WARNING: If the original PDF has incorrect unicode, changing the font will render the PDF unreadable, so use of this property for PDFs where the unicode correctness cannot be guaranteed is not recommeneded.
Declaration
Objective-C
@property (nonatomic, copy, readwrite) NSString *_Nonnull fontOverrideName;
Swift
var fontOverrideName: String { get set }