PTSelectionRectContainerView
@interface PTSelectionRectContainerView : UIView <PTOverridable>
A transparent container view for the shaded PTSelectionRectView
and the resize widgets.
-
Initializes a new
PTSelectionRectContainerView
instance.Declaration
Objective-C
- (nonnull instancetype)initWithPDFViewCtrl:(nonnull PTPDFViewCtrl *)pdfViewCtrl forAnnot:(nullable PTAnnot *)annot withAnnotEditTool:(nonnull PTAnnotEditTool *)tool;
Swift
init(pdfViewCtrl: PTPDFViewCtrl, for annot: PTAnnot?, with tool: PTAnnotEditTool)
Parameters
pdfViewCtrl
The PTPDFViewCtrl instance that this view uses.
annot
The annotation that this view will be shown over, or
nil
.tool
The current tool.
Return Value
An initialized
PTSelectionRectContainerView
instance.
-
The shaded rectangle that is overlayed onto the selected annotation.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTSelectionRectView *_Nonnull selectionRectView;
Swift
var selectionRectView: PTSelectionRectView { get }
-
The rectangle that covers the group of annotations
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull groupSelectionRectView;
Swift
var groupSelectionRectView: UIView { get }
-
The rectangle that draws the line between control resize widgets
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull borderView;
Swift
var borderView: UIView { get }
-
The PTPDFViewCtrl that the selection is on.
Declaration
Objective-C
@property (nonatomic, weak) PTPDFViewCtrl *_Nullable pdfViewCtrl;
Swift
weak var pdfViewCtrl: PTPDFViewCtrl? { get set }
-
The margin between the border and the selection.
Note
The default value of this property is20pt
.Declaration
Objective-C
@property (nonatomic) CGFloat selectionRectMargin;
Swift
var selectionRectMargin: CGFloat { get set }
-
The width of the border drawn around the selection.
Note
The default value of this property is1.0pt
.Declaration
Objective-C
@property (nonatomic) CGFloat borderWith;
Swift
var borderWith: CGFloat { get set }
-
The corner radius of the border drawn around the selection.
Note
The default value of this property is0.0
.Declaration
Objective-C
@property (nonatomic) CGFloat borderCornerRadius;
Swift
var borderCornerRadius: CGFloat { get set }
-
The resize widgets displayed by this view.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSArray<PTResizeWidgetView *> *_Nonnull resizeWidgetViews;
Swift
var resizeWidgetViews: [PTResizeWidgetView] { get }
-
Returns the resize widget for the specified location.
Declaration
Objective-C
- (nonnull PTResizeWidgetView *)resizeWidgetViewForLocation: (PTResizeHandleLocation)location;
Swift
func resizeWidgetView(for location: PTResizeHandleLocation) -> PTResizeWidgetView
Parameters
location
The location of the resize widget.
Return Value
The resize widget for the specified location.
-
Undocumented
Declaration
Objective-C
- (BOOL)isResizeWidgetViewHiddenForLocation:(PTResizeHandleLocation)location;
Swift
func isResizeWidgetViewHidden(for location: PTResizeHandleLocation) -> Bool
-
Undocumented
Declaration
Objective-C
- (void)setResizeWidgetViewHidden:(BOOL)hidden forLocation:(PTResizeHandleLocation)location;
Swift
func setResizeWidgetViewHidden(_ hidden: Bool, for location: PTResizeHandleLocation)
-
Undocumented
Declaration
Objective-C
- (void)hideResizeWidgetViewForLocation:(PTResizeHandleLocation)location;
Swift
func hideResizeWidgetView(for location: PTResizeHandleLocation)
-
Undocumented
Declaration
Objective-C
- (void)showResizeWidgetViewForLocation:(PTResizeHandleLocation)location;
Swift
func showResizeWidgetView(for location: PTResizeHandleLocation)
-
Undocumented
Declaration
Objective-C
- (void)setResizeWidgetIcon:(nullable UIImage *)resizeWidgetIcon forLocation:(PTResizeHandleLocation)location UI_APPEARANCE_SELECTOR;
Swift
func setResizeWidgetIcon(_ resizeWidgetIcon: UIImage?, for location: PTResizeHandleLocation)
-
Undocumented
Declaration
Objective-C
- (nullable UIImage *)resizeWidgetIconForLocation:(PTResizeHandleLocation)location;
Swift
func resizeWidgetIcon(for location: PTResizeHandleLocation) -> UIImage?
-
When true, only displays corner resize handles. Default is
false
.Declaration
Objective-C
@property (nonatomic) BOOL displaysOnlyCornerResizeHandles;
Swift
var displaysOnlyCornerResizeHandles: Bool { get set }
-
Hides all of the resize widgets.
Declaration
Objective-C
- (void)hideResizeWidgetViews;
Swift
func hideResizeWidgetViews()
-
Shows all of the resize widgets.
Declaration
Objective-C
- (void)showResizeWidgetViews;
Swift
func showResizeWidgetViews()
-
Shows the width resize widget (for spacing texts).
Declaration
Objective-C
- (void)showWidthResizeWidgetView;
Swift
func showWidthResizeWidgetView()
-
Used to set the view’s frame to match the selected annotation’s frame.
Declaration
Objective-C
- (void)setFrameFromAnnot:(CGRect)frame;
Swift
func setFrameFromAnnot(_ frame: CGRect)
Parameters
frame
The view’s new frame.
-
The rotation handle used for annotation rotating.
Declaration
Objective-C
@property (nonatomic, strong, nullable) PTRotateWidgetView *rotationHandle;
Swift
var rotationHandle: PTRotateWidgetView? { get set }
-
Used to set the location of the rotation handle.
Declaration
Objective-C
- (void)setRotationHandleLocation:(PTRotateHandleLocation)location;
Swift
func setRotationHandleLocation(_ location: PTRotateHandleLocation)
Parameters
location
The location of the rotation handle.
-
The text view used for free text annotation editing.
Declaration
Objective-C
@property (nonatomic, strong, nullable) PTFreeTextView *textView;
Swift
var textView: PTFreeTextView? { get set }
-
The text view presented when a spacing text annotation is selected.
Declaration
Objective-C
@property (nonatomic, strong, nullable) PTFreeTextView *spacingTextView;
Swift
var spacingTextView: PTFreeTextView? { get set }
-
Scales the text size of a free text annotation that’s being edited for the current zoom.
Declaration
Objective-C
- (void)setEditTextSizeForZoom:(double)zoom forFontSize:(int)size;
Swift
func setEditTextSizeForZoom(_ zoom: Double, forFontSize size: Int32)
-
Adds a UITextView to the selection rectangle for PTFreeText annotation editing.
Declaration
Objective-C
- (void)useTextViewWithText:(nullable NSString *)text withAlignment:(int)alignment atZoom:(double)zoom forFontSize:(int)size withFontName:(nonnull NSString *)fontName withFrame:(CGRect)frame withDelegate:(nonnull id<UITextViewDelegate>)delegateView;
Swift
func useTextView(withText text: String?, withAlignment alignment: Int32, atZoom zoom: Double, forFontSize size: Int32, withFontName fontName: String, withFrame frame: CGRect, with delegateView: any UITextViewDelegate)
-
-useTextViewWithAttributedText:withAlignment:atZoom:forFontSize:withFontName:withFrame:withDelegate:
Adds a UITextView to the selection rectangle for PTFreeText annotation editing.
Declaration
Objective-C
- (void) useTextViewWithAttributedText:(nullable NSAttributedString *)attributedText withAlignment:(int)alignment atZoom:(double)zoom forFontSize:(int)size withFontName:(nonnull NSString *)fontName withFrame:(CGRect)frame withDelegate:(nonnull id<UITextViewDelegate>)delegateView;
Swift
func useTextView(withAttributedText attributedText: NSAttributedString?, withAlignment alignment: Int32, atZoom zoom: Double, forFontSize size: Int32, withFontName fontName: String, withFrame frame: CGRect, with delegateView: any UITextViewDelegate)
-
Undocumented
Declaration
Objective-C
- (void)useTextViewForSpacingText:(nullable NSString *)text withAlignment:(int)alignment atZoom:(double)zoom forFontSize:(int)size withFontName:(NSString*)fontName withFrame:(CGRect)frame;
Swift
func useTextView(forSpacingText text: String?, withAlignment alignment: Int32, atZoom zoom: Double, forFontSize size: Int32, withFontName fontName: String, withFrame frame: CGRect)
-
Undocumented
Declaration
Objective-C
- (void)useTextViewForSpacingAttributedText:(nullable NSAttributedString *)attributedText withAlignment:(int)alignment atZoom:(double)zoom forFontSize:(int)size withFontName:(NSString*)fontName withFrame:(CGRect)frame;
Swift
func useTextView(forSpacingAttributedText attributedText: NSAttributedString?, withAlignment alignment: Int32, atZoom zoom: Double, forFontSize size: Int32, withFontName fontName: String, withFrame frame: CGRect)
-
Shows the selection rect. For use when editing line and arrow annotations, where the selection rectangle is not shown when the annotation is not being moved, and has a different appearance than other annotation types.
Declaration
Objective-C
- (void)showSelectionRect;
Swift
func showSelectionRect()
-
Hides the selection rect. For use when editing line and arrow annotations, where the selection rectangle is not shown when the annotation is not being moved, and has a different appearance than other annotation types.
Declaration
Objective-C
- (void)hideSelectionRect;
Swift
func hideSelectionRect()
-
Sets the annot type that is selected. Used to determine the appearance of the child
PTSelectionRectView
.Declaration
Objective-C
- (void)setAnnot:(nullable PTAnnot *)annot pageNumber:(int)pageNumber;
Swift
func setAnnot(_ annot: PTAnnot?, pageNumber: Int32)
Parameters
annot
The annotation that is selected.
pageNumber
The PDF page number of the annotation.
-
Refreshes the live representation of the annotation’s appearance.
Declaration
Objective-C
- (void)refreshLiveAppearance;
Swift
func refreshLiveAppearance()
-
Removes the live representation of the annotation’s appearance.
Declaration
Objective-C
- (void)removeLiveAppearance;
Swift
func removeLiveAppearance()
-
Undocumented
Declaration
Objective-C
-(instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
-(instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
-(instancetype)init NS_UNAVAILABLE;