PTPageTemplateViewController


@interface PTPageTemplateViewController : UITableViewController <PTOverridable>

Displays a control for adding blank pages. Allows the user to add pages with various page background templates such as line, grid, graph, and music.

  • Initializes a newly created reflow view controller that scrolls horizontally.

    Declaration

    Objective-C

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

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)

    Parameters

    pdfViewCtrl

    the PDFViewCtrl instance that the control coordinates with

    Return Value

    The initialized reflow view controller.

  • The list of page types available to use. This should be an array of PTPageTemplateStyles converted to NSNumbers. e.g. @[@(PTPageTemplateStyleBlank), @(PTPageTemplateStyleLined)];

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<NSNumber *> *pageTemplates;

    Swift

    var pageTemplates: [NSNumber]? { get set }
  • The list of page sizes available to select. The dictionary key should be the string describing the page type. This will be displayed to the user. The value should be an NSValue created from a CGSize whose dimensions are in inches.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSDictionary<NSString *, NSValue *> *pageSizes;

    Swift

    var pageSizes: [String : NSValue]? { get set }
  • The list of page colors available to select.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSArray<UIColor *> *pageColors;

    Swift

    var pageColors: [UIColor]? { get set }
  • The name of the default page size to use when displaying the control This value must be present as a key in the pageSizes property, otherwise the first key in that dictionary (sorted alphabetically) will be used.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *defaultPageSize;

    Swift

    var defaultPageSize: String? { get set }
  • The page number that new pages will be insert after.

    Declaration

    Objective-C

    @property (nonatomic) int pageNumber;

    Swift

    var pageNumber: Int32 { get set }
  • The flag to indicate if this view controller is to create a new document. True for creating new documents. False for creating new pages in a document. Default value is false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL createNewDoc;

    Swift

    var createNewDoc: Bool { get set }
  • The name of the new document that this view controller is going to create.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nonnull fileName;

    Swift

    var fileName: String { get set }
  • An object that conforms to the PTPageTemplateViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTPageTemplateViewControllerDelegate> delegate;

    Swift

    weak var delegate: (any PTPageTemplateViewControllerDelegate)? { get set }
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;