PTLinkPopupViewController


@interface PTLinkPopupViewController : UIViewController

The PTLinkPopupViewController displays the textfield for users to edit the link.

  • The block to execute after pressing done button.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^)(void) addLinkAction;

    Swift

    var addLinkAction: (() -> Void)? { get set }
  • The block to execute after pressing cancel button.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^)(void) cancelAction;

    Swift

    var cancelAction: (() -> Void)? { get set }
  • Textfield to input link text.

    Declaration

    Objective-C

    @property (nonatomic, strong) UITextField *_Nonnull textField;

    Swift

    var textField: UITextField { get set }
  • An object that conforms to the PTLinkPopupViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PTLinkPopupViewControllerDelegate> _Nullable delegate;

    Swift

    weak var delegate: (any PTLinkPopupViewControllerDelegate)? { get set }
  • The page number that the page link leads to.

    Declaration

    Objective-C

    @property (nonatomic) int pageNumber;

    Swift

    var pageNumber: Int32 { get set }
  • The count of pages of the document.

    Declaration

    Objective-C

    @property (nonatomic) int totalPageNumber;

    Swift

    var totalPageNumber: Int32 { get set }
  • Whether the created link annot links to a web page or a page inside the document. The default value is YES, meaning it’s linked to a web page.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isLinkToWeb;

    Swift

    var isLinkToWeb: Bool { get set }
  • Set the PTLinkPopupViewController to link to a web page.

    Declaration

    Objective-C

    - (void)linkToWeb;

    Swift

    func linkToWeb()
  • Set the PTLinkPopupViewController to link to a page inside the document.

    Declaration

    Objective-C

    - (void)linkToPage;

    Swift

    func linkToPage()