PSPDFFreeTextAccessoryView

Free Text accessory toolbar for faster styling.

  • List of supported inspector properties for various annotation types Dictionary in format annotation type string : array of arrays of property strings (NSArray<NSArray<PSPDFAnnotationString> *> *) OR a block that returns this and takes annotations as argument (NSArray<NSArray<PSPDFAnnotationString> *> *(^block)(PSPDFAnnotation *annotation)). - note: Only the PSPDFAnnotationStringFreeText key is relevant for this component. Defaults to an empty dictionary. Normally set to the values from PSPDFConfiguration after initialization.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic)
        NSDictionary<PSPDFAnnotationString, id> *_Nonnull propertiesForAnnotations;

    Swift

    var propertiesForAnnotations: [PSPDFAnnotationString : Any] { get set }
  • Whether a thing border should be added just above the accessory view. Defaults to YES.

    Declaration

    Objective-C

    @property (getter=isBorderVisible, assign, readwrite, nonatomic)
        BOOL borderVisible;

    Swift

    var isBorderVisible: Bool { get set }
  • The color for the default separators and border.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull separatorColor;

    Swift

    var separatorColor: UIColor { get set }
  • By default the accessory view buttons differ based on the available toolbar width. Use this to customize the button order or fixate a certain set of buttons. - note: The default arrays include PSPDFToolbarSeparatorButton and PSPDFToolbarSpacerButton objects.

    Declaration

    Objective-C

    - (nonnull NSArray<__kindof PSPDFToolbarButton *> *)buttonsForWidth:
        (CGFloat)width;

    Swift

    func buttons(forWidth width: CGFloat) -> [PSPDFToolbarButton]
  • This is called on size changes and when the free text accessory is deallocated. If you present your own controller, add custom logic here to ensure it’s dismissed.

    Declaration

    Objective-C

    - (void)dismissPresentedViewControllersAnimated:(BOOL)animated;

    Swift

    func dismissPresentedViewControllers(animated: Bool)