PTSelectionRectContainerView

@interface PTSelectionRectContainerView : UIView

A transparent container view for the shaded PTSelectionRectView and the resize widgets.

  • The shaded rectangle that is overlayed onto the selected annotation.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        PTSelectionRectView *_Nonnull selectionRectView;

    Swift

    var selectionRectView: PTSelectionRectView { get }
  • The rectangle that covers the group of annotations

    Declaration

    Objective-C

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

    Swift

    var groupSelectionRectView: UIView { get }
  • The rectangle that draws the line between control resize widgets

    Declaration

    Objective-C

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

    Swift

    var borderView: UIView { get }
  • The PTPDFViewCtrl that the selection is on.

    Declaration

    Objective-C

    @property (readwrite, nonatomic) PTPDFViewCtrl *_Nullable pdfViewCtrl;

    Swift

    weak var pdfViewCtrl: PTPDFViewCtrl? { get set }
  • When true, only displays corner resize handles. Default is false.

    Declaration

    Objective-C

    @property (assign, readwrite, 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 North-East and South-West resize widgets (for lines/arrows).

    Declaration

    Objective-C

    - (void)showNESWWidgetViews;

    Swift

    func showNESWWidgetViews()
  • Shows the North-West and South-East resize widgets (for lines/arrows).

    Declaration

    Objective-C

    - (void)showNWSEWidgetViews;

    Swift

    func showNWSEWidgetViews()
  • 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 text view used for free text annotation editing.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UITextView *textView;

    Swift

    var textView: UITextView? { 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: UITextViewDelegate)
  • Saves any changes made to a PTFreeText back to the PTPDFDoc.

    Declaration

    Objective-C

    - (void)setAnnotationContents:(nonnull PTAnnot *)annot;

    Swift

    func setAnnotationContents(_ annot: PTAnnot)

    Parameters

    annot

    The annotation that is selected.

  • 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;

    Swift

    func setAnnot(_ annot: PTAnnot?)

    Parameters

    annot

    The annotation that is selected.

  • 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()
  • Instantiates a new PTSelectionRectContainerView object.

    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.

    tool

    The current tool.