PTAddPagesManager

@interface PTAddPagesManager
    : NSObject <UIImagePickerControllerDelegate, UINavigationControllerDelegate,
                UIDocumentPickerDelegate>

An object that manages the controls for adding new pages to a document. New pages can be created from blank page templates (e.g. lined, grid, dotted), added from other documents, or created from images.

  • Shows a PTPageTemplateViewController for adding blank pages to the document.

    Declaration

    Objective-C

    - (void)showPageTemplateViewController;

    Swift

    func showPageTemplateViewController()
  • Shows a UIImagePickerController to insert an image as a page into the document.

    Declaration

    Objective-C

    - (void)showImagePickerController;

    Swift

    func showImagePickerController()
  • Shows a UIDocumentPickerViewController to insert pages from another document into the current document.

    Declaration

    Objective-C

    - (void)showDocumentPickerViewController;

    Swift

    func showDocumentPickerViewController()
  • The page number after which the manager will insert new pages.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int pageNumber;

    Swift

    var pageNumber: Int32 { get set }
  • The UIViewController which will be used to present the manager’s UI controls.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable)
        UIViewController *presentingViewController;

    Swift

    weak var presentingViewController: UIViewController? { get set }
  • The UIBarButtonItem used when a popover presentation is required.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) UIBarButtonItem *barButtonItem;

    Swift

    weak var barButtonItem: UIBarButtonItem? { get set }
  • The source view used when a popover presentation is required.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) UIView *sourceView;

    Swift

    weak var sourceView: UIView? { get set }
  • The default white page background color

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, class) UIColor *_Nonnull whitePageColor;

    Swift

    class var whitePageColor: UIColor { get }
  • The default yellow page background color

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, class) UIColor *_Nonnull yellowPageColor;

    Swift

    class var yellowPageColor: UIColor { get }
  • The default blueprint page background color

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, class)
        UIColor *_Nonnull blueprintPageColor;

    Swift

    class var blueprintPageColor: UIColor { get }
  • Creates a new PTPDFDoc with the specified parameters.

    Declaration

    Objective-C

    + (nonnull PTPDFDoc *)createDocWithTemplate:(PTPageTemplateStyle)pageTemplate
                                       pageSize:(CGSize)pageSize
                                backgroundColor:(nonnull UIColor *)backgroundColor
                                      pageCount:(int)pageCount
                                       portrait:(BOOL)portrait;

    Swift

    class func createDoc(withTemplate pageTemplate: PTPageTemplateStyle, pageSize: CGSize, backgroundColor: UIColor, pageCount: Int32, portrait: Bool) -> PTPDFDoc

    Parameters

    pageTemplate

    The PTPageTemplateStyle to use as a template.

    pageSize

    The size in inches of the document.

    backgroundColor

    The background color of the document.

    pageCount

    The number of pages to create.

    portrait

    Whether or not the page layout should be in portrait.