PTTextWidgetAppearanceView


@interface PTTextWidgetAppearanceView
    : PTAnnotationAppearanceView <UITextViewDelegate>

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

  • Initializes a newly created PTTextWidgetAppearanceView instance.

    Declaration

    Objective-C

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

    Swift

    init(frame: CGRect)

    Return Value

    An initialized PTTextWidgetAppearanceView instance.

  • Initializes a PTTextWidgetAppearanceView 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 PTTextWidgetAppearanceView, or nil if an error occurred.

  • 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 view used to display the border.

    Declaration

    Objective-C

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

    Swift

    var borderView: UIView { get }
  • 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 PTTextWidgetAppearanceView and should not be changed.

    Note

    The text view’s font is adjusted for the current zoomScale and should not be set or queried externally.

    Declaration

    Objective-C

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

    Swift

    var textView: UITextView { get }
  • A layout guide for the area inside the border.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UILayoutGuide *_Nonnull contentLayoutGuide;

    Swift

    var contentLayoutGuide: UILayoutGuide { get }