PSPDFColorPatch


@interface PSPDFColorPatch : NSObject

A color patch represents a single patch of colors in the UI. It contains of one or multiple colors that should be grouped together.

  • Create a color patch representing a single color.

    Declaration

    Objective-C

    + (nonnull instancetype)colorPatchWithColor:(nonnull UIColor *)color;

    Swift

    convenience init(color: NSColor)

    Parameters

    color

    The color that this patch should represent.

    Return Value

    A newly created instance of PSPDFColorPatch representing the passed in color.

  • Create a color patch representing multiple colors.

    Declaration

    Objective-C

    + (nonnull instancetype)colorPatchWithColors:
        (nonnull NSArray<UIColor *> *)colors;

    Swift

    convenience init(colors: [NSColor])

    Parameters

    colors

    The colors that this patch should represent.

    Return Value

    A newly created instance of PSPDFColorPatch representing the passed in colors.

  • The colors that this color patch represents.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSArray<UIColor *> *_Nonnull colors;

    Swift

    var colors: [NSColor] { get }