PTFreeTextAppearanceView


@interface PTFreeTextAppearanceView
    : PTAnnotationAppearanceView <UITextViewDelegate>

A view that displays the appearance of a free text annotation.

  • Initializes a newly created PTFreeTextAppearanceView instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame;

    Swift

    init(frame: CGRect)

    Return Value

    An initialized PTFreeTextAppearanceView instance.

  • Initializes a PTFreeTextAppearanceView from data in the given unarchiver.

    Declaration

    Objective-C

    - (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder;

    Swift

    init?(coder: NSCoder)

    Parameters

    coder

    The unarchiver object.

    Return Value

    An initialized PTFreeTextAppearanceView, or nil if an error occurred.

  • The view used to display the background.

    The background is drawn inside the borders.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIView *_Nonnull backgroundView;

    Swift

    var backgroundView: UIView { get }
  • The view containing all content inside the borders.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIView *_Nonnull contentView;

    Swift

    var contentView: UIView { get }
  • The view used to display the text itself.

    Warning

    The text view’s delegate is the PTFreeTextAppearanceView and should not be changed.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UITextView *_Nonnull textView;

    Swift

    var textView: UITextView { get }
  • The scaling applied to the contents of this view when zoomed.

    In order to avoid bitmap-based scaling of the content, the font size of the text view is adjusted for the current zoom scale. As a result, the text view’s font should not be set or queried externally.

    Note

    The default value of this property is 1.0.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat zoomScale;

    Swift

    var zoomScale: CGFloat { get set }
  • The scaling applied to this view’s font.

    An additional scale factor applied to the font size of the text view.

    Note

    The default value of this property is 1.0.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat fontScale;

    Swift

    var fontScale: CGFloat { get set }