PSPDFColorPatch
Objective-C
@interface PSPDFColorPatch : NSObject
Swift
class ColorPatch : 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 PSPDFColorPatch *)colorPatchWithColor:(nonnull UIColor *)color;
Swift
/*not inherited*/ init(color: UIColor)
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 PSPDFColorPatch *)colorPatchWithColors: (nonnull NSArray<UIColor *> *)colors;
Swift
/*not inherited*/ init(colors: [UIColor])
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 (nonatomic, copy, readonly) NSArray<UIColor *> *_Nonnull colors;
Swift
var colors: [UIColor] { get }