One Logo Pool Ball
PencilKit · IOS API REFERENCE

PKInkingTool

struct · iOS 13.0+ · SDK 27.1

struct PKInkingTool

Members (14)

static · iOS 13.0+

convertColor

TypeScript
static convertColor(color: _UIKit_UIColor, from: _UIKit_UIUserInterfaceStyle, to: _UIKit_UIUserInterfaceStyle): _UIKit_UIColor
Swift declaration
static func convertColor(_ color: UIColor, from: UIUserInterfaceStyle, to: UIUserInterfaceStyle) -> UIColor
get · iOS 17.0+

requiredContentVersion

TypeScript
get requiredContentVersion(): PKContentVersion
Swift declaration
var requiredContentVersion: PKContentVersion { get }

The PencilKit version required to use this inking tool.

init · iOS 14.0+

init

TypeScript
static initInkWidth(ink: PKInk, width: number): PKInkingTool
Swift declaration
init(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

TypeScript
get ink(): PKInk
Swift declaration
var ink: PKInk { get }

The ink that this tool will create strokes with.

get · iOS 13.0+

color

TypeScript
get color(): _UIKit_UIColor
Swift declaration
var color: UIColor { get set }
set · iOS 13.0+

color

TypeScript
set color(value: _UIKit_UIColor)
Swift declaration
var color: UIColor { get set }
get · iOS 13.0+

width

TypeScript
get width(): number
Swift declaration
var width: CGFloat { get set }

The base width of the ink.

set · iOS 13.0+

width

TypeScript
set width(value: number)
Swift declaration
var width: CGFloat { get set }

The base width of the ink.

get · iOS 26.0+

azimuth

TypeScript
get azimuth(): number
Swift declaration
var azimuth: CGFloat { get set }

The base angle of the ink.

set · iOS 26.0+

azimuth

TypeScript
set azimuth(value: number)
Swift declaration
var azimuth: CGFloat { get set }

The base angle of the ink.

get · iOS 13.0+

inkType

TypeScript
get inkType(): PKInkingTool_InkType
Swift declaration
var inkType: PKInkingTool.InkType { get set }

The type of ink.

set · iOS 13.0+

inkType

TypeScript
set inkType(value: PKInkingTool_InkType)
Swift declaration
var inkType: PKInkingTool.InkType { get set }

The type of ink.

init · iOS 26.0+

init

TypeScript
static initColorWidthAzimuth(inkType: PKInkingTool_InkType, color: _UIKit_UIColor, width: (number) | null, azimuth: number): PKInkingTool
Swift declaration
init(_ inkType: PKInkingTool.InkType, color: UIColor = UIColor.black, width: CGFloat? = nil, azimuth: CGFloat)
init · iOS 13.0+

init

TypeScript
static initColorWidth(inkType: PKInkingTool_InkType, color?: _UIKit_UIColor, width?: (number) | null): PKInkingTool
Swift declaration
init(_ inkType: PKInkingTool.InkType, color: UIColor = UIColor.black, width: CGFloat? = nil)

Skipped declarations

No declarations were skipped in this snapshot.

All PencilKit types →