PSPDFColorPickerFactory
Objective-C
@interface PSPDFColorPickerFactory : NSObject <PSPDFOverridable>
Swift
class ColorPickerFactory : NSObject, Overridable
The factory used to create color pickers. Subclass this to customize your color pickers.
Note
Starting with iOS 14 PSPDFKit’s default UI will display the system color picker (UIColorPickerViewController
) where possible. On macOS Big Sur and later the system
color picker will also be used for select options (e.g. the highlight annotation menu).
Customizing this API will have no effect on the system color picker.
-
You can override this method to customize the color palettes for a certain color set.
Note
When overriding, design your method so that it can handle arbitrary values for the
colorSet
parameter. You can either return your own default palettes if you are experiencing unknown values or return super’s return value to fall back to PSPDFKit’s internal color palettes.Declaration
Objective-C
+ (nonnull NSArray<PSPDFColorPalette *> *)colorPalettesInColorSet: (PSPDFColorSet)colorSet;
Swift
class func colorPalettes(in colorSet: ColorPatch.ColorSet) -> [ColorPalette]
Parameters
colorSet
The color set whose color palettes are requested.
Return Value
An array of
PSPDFColorPalette
s representing the passed in color set.