PTAnnotStyleViewController


@interface PTAnnotStyleViewController
    : UIViewController <PTOverridable, PTAnnotStyleDelegate>

The AnnotStyleViewController displays a list of controls for adjusting the appearance and properties of an annotation or annotation type. The available controls are determined based on the type of annotation provided.

  • Returns an initialized instance of the PTAnnotStyleViewController class.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Returns an initialized instance of the PTAnnotStyleViewController class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAnnotStyle:(nullable PTAnnotStyle *)annotStyle;

    Swift

    init(annotStyle: PTAnnotStyle?)

    Parameters

    annotStyle

    A PTAnnotStyle instance initialized with an annotation or annotation type.

  • Returns an initialized instance of the PTAnnotStyleViewController class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToolManager:(nonnull PTToolManager *)toolManager
                                     annotStyle:(nonnull PTAnnotStyle *)annotStyle;

    Swift

    convenience init(toolManager: PTToolManager, annotStyle: PTAnnotStyle)

    Parameters

    toolManager

    An instance of PTToolManager.

    annotStyle

    An instance of PTAnnotStyle initialized with an annotation or annotation type.

  • Returns an object initialized from data in a given unarchiver.

    Declaration

    Objective-C

    - (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder;

    Swift

    init?(coder: NSCoder)

    Parameters

    coder

    An unarchiver object

    Return Value

    self, initialized using the data in decoder, or nil if the object could not be initialized

  • An object that manages and stores the current colors and properties for an annotation.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) PTAnnotStyle *annotStyle;

    Swift

    var annotStyle: PTAnnotStyle? { get set }
  • An object that conforms to the PTAnnotStyleViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTAnnotStyleViewControllerDelegate> delegate;

    Swift

    weak var delegate: (any PTAnnotStyleViewControllerDelegate)? { get set }
  • Whether a preview of the annotation is shown with the current style.

    The default value of this property is NO when this view controller’s annotStyle has an annotation, ie. PTAnnotStyle.annot is nonnull; the default value is YES when the annotStyle does not have an annotation.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showsAnnotationPreview;

    Swift

    var showsAnnotationPreview: Bool { get set }
  • The configuration that will be used for the font picker.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) UIFontPickerViewControllerConfiguration *fontPickerConfiguration;

    Swift

    var fontPickerConfiguration: UIFontPickerViewController.Configuration? { get set }
  • The PTColorPickerViewController managed by this view controller.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) PTColorPickerViewController *_Nonnull colorPickerViewController;

    Swift

    var colorPickerViewController: PTColorPickerViewController { get }
  • The iOS system UIColorPickerViewController managed by this view controller.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NS_AVAILABLE_IOS(14_0) UIColorPickerViewController *uiColorPickerViewController;

    Swift

    var uiColorPickerViewController: UIColorPickerViewController { get }
  • If this view controller should resize itself to preferredContentSize. Default is true.

    Declaration

    Objective-C

    @property (nonatomic) BOOL shouldResize;

    Swift

    var shouldResize: Bool { get set }
  • Request the AnnotStyleViewController to call its delegate’s annotStyleViewController:didCommitStyle method.

    Declaration

    Objective-C

    - (void)selectStyle;

    Swift

    func selectStyle()
  • This method is called when the user selects a color from the colorPickerViewController or uiColorPickerViewController

    Declaration

    Objective-C

    - (void)didSelectColor:(nonnull UIColor *)color
        withViewController:(nonnull UIViewController *)viewController;

    Swift

    func didSelect(_ color: UIColor, with viewController: UIViewController)
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithNibName:(nullable NSString *)nibName bundle:(nullable NSBundle *)nibBundle NS_UNAVAILABLE;