PencilKit · IOS API REFERENCE
PKInkingTool
struct · iOS 13.0+ · SDK 27.1
struct PKInkingTool
Members (14)
static · iOS 13.0+convertColor
TypeScriptstatic convertColor(color: _UIKit_UIColor, from: _UIKit_UIUserInterfaceStyle, to: _UIKit_UIUserInterfaceStyle): _UIKit_UIColor
Swift declarationstatic func convertColor(_ color: UIColor, from: UIUserInterfaceStyle, to: UIUserInterfaceStyle) -> UIColor
get · iOS 17.0+requiredContentVersion
TypeScriptget requiredContentVersion(): PKContentVersion
Swift declarationvar requiredContentVersion: PKContentVersion { get }
The PencilKit version required to use this inking tool.
init · iOS 14.0+init
TypeScriptstatic initInkWidth(ink: PKInk, width: number): PKInkingTool
Swift declarationinit(ink: PKInk, width: CGFloat)
Create a tool for the provided ink.
- parameter ink: The ink to use.
- parameter width: The width of stroke to create.
get · iOS 14.0+ink
TypeScriptget ink(): PKInk
Swift declarationvar ink: PKInk { get }
The ink that this tool will create strokes with.
get · iOS 13.0+color
TypeScriptget color(): _UIKit_UIColor
Swift declarationvar color: UIColor { get set }
set · iOS 13.0+color
TypeScriptset color(value: _UIKit_UIColor)
Swift declarationvar color: UIColor { get set }
get · iOS 13.0+width
TypeScriptget width(): number
Swift declarationvar width: CGFloat { get set }
The base width of the ink.
set · iOS 13.0+width
TypeScriptset width(value: number)
Swift declarationvar width: CGFloat { get set }
The base width of the ink.
get · iOS 26.0+azimuth
TypeScriptget azimuth(): number
Swift declarationvar azimuth: CGFloat { get set }
The base angle of the ink.
set · iOS 26.0+azimuth
TypeScriptset azimuth(value: number)
Swift declarationvar azimuth: CGFloat { get set }
The base angle of the ink.
get · iOS 13.0+inkType
TypeScriptget inkType(): PKInkingTool_InkType
Swift declarationvar inkType: PKInkingTool.InkType { get set }
The type of ink.
set · iOS 13.0+inkType
TypeScriptset inkType(value: PKInkingTool_InkType)
Swift declarationvar inkType: PKInkingTool.InkType { get set }
The type of ink.
init · iOS 26.0+init
TypeScriptstatic initColorWidthAzimuth(inkType: PKInkingTool_InkType, color: _UIKit_UIColor, width: (number) | null, azimuth: number): PKInkingTool
Swift declarationinit(_ inkType: PKInkingTool.InkType, color: UIColor = UIColor.black, width: CGFloat? = nil, azimuth: CGFloat)
init · iOS 13.0+init
TypeScriptstatic initColorWidth(inkType: PKInkingTool_InkType, color?: _UIKit_UIColor, width?: (number) | null): PKInkingTool
Swift declarationinit(_ inkType: PKInkingTool.InkType, color: UIColor = UIColor.black, width: CGFloat? = nil)
Skipped declarations
No declarations were skipped in this snapshot.
All PencilKit types →