PTFreeTextAppearanceView
@interface PTFreeTextAppearanceView
: PTAnnotationAppearanceView <UITextViewDelegate>
A view that displays the appearance of a free text annotation.
-
Initializes a newly created
PTFreeTextAppearanceViewinstance.Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;Swift
init(frame: CGRect)Return Value
An initialized
PTFreeTextAppearanceViewinstance. -
Initializes a
PTFreeTextAppearanceViewfrom data in the given unarchiver.Declaration
Objective-C
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder;Swift
init?(coder: NSCoder)Parameters
coderThe unarchiver object.
Return Value
An initialized
PTFreeTextAppearanceView, ornilif an error occurred.
-
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) PTFreeTextAppearanceViewModel *viewModel;Swift
var viewModel: PTFreeTextAppearanceViewModel? { get } -
Declaration
Objective-C
- (void)configureWithViewModel: (nonnull PTFreeTextAppearanceViewModel *)viewModel;Swift
func configure(with viewModel: PTFreeTextAppearanceViewModel)
-
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 thePTFreeTextAppearanceViewand 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 is1.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 is1.0.Declaration
Objective-C
@property (nonatomic) CGFloat fontScale;Swift
var fontScale: CGFloat { get set }
PTFreeTextAppearanceView Class Reference