PTFreeTextCreate
@interface PTFreeTextCreate : PTTool <UITextViewDelegate>
Creates a free text annotation.
-
The
PTFreeTextViewinstance used for interactive text entry.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTFreeTextView *_Nonnull textView;Swift
var textView: PTFreeTextView { get } -
Undocumented
Declaration
Objective-C
- (instancetype)initWithPDFViewCtrl:(PTPDFViewCtrl *)pdfViewCtrl textView:(UITextView *)textView;Swift
init(pdfViewCtrl: PTPDFViewCtrl, textView: UITextView) -
Commits the free text annotation to the document.
Declaration
Objective-C
- (void)commitAnnotation;Swift
func commitAnnotation() -
Creates a free text annotation from the tool’s current state.
Declaration
Objective-C
- (nonnull PTFreeText *)createFreeText;Swift
func createFreeText() -> PTFreeTextReturn Value
a new
PTFreeTextinstance for the current document -
Sets the rect of the free text annotation.
Declaration
Objective-C
- (void)setRectForFreeText:(nonnull PTFreeText *)freeText;Swift
func setRectFor(_ freeText: PTFreeText)Parameters
freeTextthe free text annotation
-
Applies the text color, border appearance, and other properties to the free text annotation before it is committed.
Declaration
Objective-C
- (void)setPropertiesForFreeText:(nonnull PTFreeText *)freeText;Swift
func setPropertiesFor(_ freeText: PTFreeText)Parameters
freeTextthe free text annotation
-
Sets the rect for a
PTFreeTextannotation.Declaration
Objective-C
+ (void)setRectForFreeText:(nonnull PTFreeText *)freeText withRect:(nonnull PTPDFRect *)rect pdfViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl isRTL:(BOOL)isRTL;Swift
class func setRectFor(_ freeText: PTFreeText, with rect: PTPDFRect, pdfViewCtrl: PTPDFViewCtrl, isRTL: Bool)Parameters
freeTextThe
PTFreeTextobject.rectThe
PTPDFRectrepresentation of the associatedUITextView.pdfViewCtrlThe
PTPDFViewCtrlobject.isRTLA
BOOLindicating whether the text is in a right-to-left language. -
Sets the free text appearance as is rendered by the iOS UI.
The annotation’s rotation will be rendered in accordance with its rotation flag.
Declaration
Objective-C
+ (void)refreshAppearanceForAnnot:(nonnull PTFreeText *)freeText onDoc:(nonnull PTPDFDoc *)doc;Swift
class func refreshAppearance(forAnnot freeText: PTFreeText, on doc: PTPDFDoc)Parameters
freeTextThe
PTFreeTextannotation that needs its appearance refreshed.docThe
PTPDFDocthat the annotation is part of. -
Creates a new appearance for a
PTFreeTextannotation that ensures it is facing up at the time of creation.Declaration
Objective-C
+ (void)createAppearanceForAnnot:(nonnull PTFreeText *)freeText onDoc:(nonnull PTPDFDoc *)doc withViewerRotation:(PTRotate)viewerRotation;Swift
class func createAppearance(forAnnot freeText: PTFreeText, on doc: PTPDFDoc, withViewerRotation viewerRotation: PTRotate)Parameters
freeTextThe
PTFreeTextannotation that needs a new appearance.docThe
PTPDFDocthat the annotation is part of.viewerRotationThe current rotation of the
PTPDFViewCtrl. -
Creates a styled
UITextViewwith properties from aPTFreeTextannotation.Declaration
Objective-C
+ (nonnull UITextView *)textViewForAnnot:(nonnull PTFreeText *)freeText onPageNumber:(int)pageNumber withPDFViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl;Swift
class func textView(forAnnot freeText: PTFreeText, onPageNumber pageNumber: Int32, with pdfViewCtrl: PTPDFViewCtrl) -> UITextViewParameters
freeTextThe
PTFreeTextobject.pageNumberThe page number on which the annotation exists.
pdfViewCtrlThe
PTPDFViewCtrlobject. -
Gets the unrotated rect from a
PTFreeTextannotation.Declaration
Parameters
rectThe rotated rect of a
PTFreeTextannotation.degreeThe rotated degree of a
PTFreeTextannotation.Return Value
The unrotated rect of the
PTFreeTextannotation. -
Gets the
PTRotatevalue from a rotated degree value.Declaration
Objective-C
+ (PTRotate)getAnnotationRotation:(double)degree;Swift
class func getAnnotationRotation(_ degree: Double) -> PTRotateParameters
degreeThe rotated degree of a
PTFreeTextannotation.Return Value
The
PTRotatevalue of the degree.
PTFreeTextCreate Class Reference