One Logo Pool Ball
App Frameworks · IOS API REFERENCE

PaperKit

Add drawings, shapes, and a consistent markup experience to your app.

74 types

370 callable entries

11 skipped

97% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

FeatureSet

struct · iOS 26.0+

FeatureSet.ContentVersion

enum · iOS 26.0+

FeatureSet.ContentVersion.RawValue

typealias · iOS 26.0+

FeatureSet.Feature

enum · iOS 26.0+

FeatureSet.Feature.AllCases

typealias · iOS 26.0+

FeatureSet.LineMarkerPositions

struct · iOS 26.0+

FeatureSet.LineMarkerPositions.ArrayLiteralElement

typealias · iOS 26.0+

FeatureSet.LineMarkerPositions.Element

typealias · iOS 26.0+

FeatureSet.LineMarkerPositions.RawValue

typealias · iOS 26.0+

ImageMarkup

struct · iOS 27.0+

ImageMarkup.ID

typealias · iOS 27.0+

LinkMarkup

struct · iOS 27.0+

LinkMarkup.ID

typealias · iOS 27.0+

LoupeMarkup

struct · iOS 27.0+

LoupeMarkup.ID

typealias · iOS 27.0+

Markup

protocol · iOS 27.0+

MarkupAdornment

struct · iOS 27.0+

MarkupAdornment.Anchor

struct

MarkupAdornment.DragRegion

struct

MarkupAdornment.ID

typealias · iOS 27.0+

MarkupAdornment.ImageConfiguration

struct

MarkupAutoresizing

struct · iOS 27.0+

MarkupAutoresizing.ArrayLiteralElement

typealias · iOS 27.0+

MarkupAutoresizing.Element

typealias · iOS 27.0+

MarkupAutoresizing.RawValue

typealias · iOS 27.0+

MarkupEditViewController

class · iOS 26.0+

MarkupEditViewController.Delegate

protocol · iOS 26.0+

MarkupError

enum · iOS 26.0+

MarkupID

struct · iOS 27.0+

MarkupID.RawValue

typealias · iOS 27.0+

MarkupInteractions

struct · iOS 27.0+

MarkupInteractions.ArrayLiteralElement

typealias · iOS 27.0+

MarkupInteractions.Element

typealias · iOS 27.0+

MarkupInteractions.RawValue

typealias · iOS 27.0+

MarkupOrderedSet

struct · iOS 27.0+

MarkupOrderedSet.Element

typealias · iOS 27.0+

MarkupOrderedSet.ElementID

enum · iOS 27.0+

MarkupOrderedSet.ElementID.RawValue

typealias · iOS 27.0+

MarkupOrderedSet.ElementIDs

struct · iOS 27.0+

MarkupOrderedSet.ElementIDs.Element

typealias · iOS 27.0+

MarkupOrderedSet.ElementIDs.Index

typealias · iOS 27.0+

MarkupOrderedSet.ElementIDs.Indices

typealias · iOS 27.0+

MarkupOrderedSet.ElementIDs.Iterator

typealias · iOS 27.0+

MarkupOrderedSet.ElementIDs.SubSequence

typealias · iOS 27.0+

MarkupOrderedSet.Index

typealias · iOS 27.0+

MarkupOrderedSet.Indices

typealias · iOS 27.0+

MarkupOrderedSet.Iterator

struct · iOS 27.0+

MarkupOrderedSet.Iterator.Element

typealias · iOS 27.0+

MarkupOrderedSet.SubSequence

typealias · iOS 27.0+

PaperMarkup

struct · iOS 26.0+

PaperMarkup.ID

typealias · iOS 27.0+

PaperMarkupViewController

class · iOS 26.0+

PaperMarkupViewController.Delegate

protocol · iOS 26.0+

PaperMarkupViewController.ScrollConfiguration

class · iOS 27.0+

PaperMarkupViewController.ScrollConfiguration.Axis

struct · iOS 27.0+

PaperMarkupViewController.ScrollConfiguration.Axis.ArrayLiteralElement

typealias · iOS 27.0+

PaperMarkupViewController.ScrollConfiguration.Axis.Element

typealias · iOS 27.0+

PaperMarkupViewController.ScrollConfiguration.Axis.RawValue

typealias · iOS 27.0+

PaperMarkupViewController.TouchMode

enum · iOS 26.0+

RenderingOptions

struct · iOS 26.0+

ShapeConfiguration

struct · iOS 26.0+

ShapeConfiguration.Shape

enum · iOS 26.0+

ShapeConfiguration.Shape.AllCases

typealias · iOS 26.0+

ShapeMarkup

struct · iOS 27.0+

ShapeMarkup.ID

typealias · iOS 27.0+

ShapeMarkup.LineMarker

enum · iOS 27.0+

ShapeMarkup.Shape

enum · iOS 27.0+

ShapeMarkup.Shape.ArrowShape

struct · iOS 27.0+

ShapeMarkup.Shape.ChatBubble

struct · iOS 27.0+

ShapeMarkup.Shape.Ellipse

struct · iOS 27.0+

ShapeMarkup.Shape.Line

struct · iOS 27.0+

ShapeMarkup.Shape.Rectangle

struct · iOS 27.0+

ShapeMarkup.Shape.RegularPolygon

struct · iOS 27.0+

ShapeMarkup.Shape.Star

struct · iOS 27.0+

Functions and constants

get · iOS 27.0+

rawValue

TypeScript
getRawValue($self: MarkupID): ArrayBuffer
Swift declaration
var rawValue: Data { get }

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

init · iOS 27.0+

init

TypeScript
init(rawValue: ArrayBuffer): (MarkupID<unknown>) | null
Swift declaration
init?(rawValue: Data)

Creates a new instance with the specified raw value. If there is no value of the type that corresponds with the specified raw value, this initializer returns `nil`. For example: enum PaperSize: String { case A4, A5, Letter, Legal } print(PaperSize(rawValue: "Legal")) // Prints "Optional(PaperSize.Legal)" print(PaperSize(rawValue: "Tabloid")) // Prints "nil" - Parameter rawValue: The raw value to use for the new instance.

get · iOS 27.0+

featureSet

TypeScript
get featureSet(): FeatureSet
Swift declaration
var featureSet: FeatureSet { get }

The set of features used by this markup.

get · iOS 27.0+

renderFrame

TypeScript
get renderFrame(): { x: number; y: number; width: number; height: number }
Swift declaration
var renderFrame: CGRect { get }

The unrotated frame that tightly fits the rendered contents of the element. This frame includes padding around `frame` to ensure it includes all the rendered aspects of the content. For example, this frame will include the strokes, and shadows of any contents.

method · iOS 27.0+

applyTransform

TypeScript
applyTransform(transform: _CoreFoundation_CGAffineTransform): void
Swift declaration
mutating func applyTransform(_ transform: CGAffineTransform)

Transforms this element with the specified transform. - Parameter transform: The transform applied to the element. Skew is ignored.

get · iOS 27.0+

allowedInteractions

TypeScript
get allowedInteractions(): MarkupInteractions
Swift declaration
var allowedInteractions: MarkupInteractions { get set }

Interactions that people can perform on this markup. Use this to configure how people can interact with the markup, such as preventing resizing, rotation, or deletion. The default is `.all`, which allows all interactions. Set to `.readOnly` to prevent all modifications.

set · iOS 27.0+

allowedInteractions

TypeScript
set allowedInteractions(value: MarkupInteractions)
Swift declaration
var allowedInteractions: MarkupInteractions { get set }

Interactions that people can perform on this markup. Use this to configure how people can interact with the markup, such as preventing resizing, rotation, or deletion. The default is `.all`, which allows all interactions. Set to `.readOnly` to prevent all modifications.

method · iOS 27.0+

removeContentUnsupported

TypeScript
removeContentUnsupported(featureSet: FeatureSet): boolean
Swift declaration
mutating func removeContentUnsupported(by featureSet: FeatureSet) -> Bool

Removes all content not supported by the provided feature set. - Parameter featureSet: The feature set to limit this markup to. - Returns: True if this was successful and the feature set is now supported. If the returned value is `true` then `self.featureSet.isSubset(of: featureSet)` will be `true`.

get · iOS 27.0+

frame

TypeScript
get frame(): { x: number; y: number; width: number; height: number }
Swift declaration
var frame: CGRect { get set }

The element's unrotated frame. Together with `rotation` this defines the element's position in its parent. This won't necessarily contain all the contents of an element, rotation and styling may cause the element to extend beyond this frame. Use `renderFrame` for an unrotated frame that contains the entire element.

set · iOS 27.0+

frame

TypeScript
set frame(value: { x: number; y: number; width: number; height: number })
Swift declaration
var frame: CGRect { get set }

The element's unrotated frame. Together with `rotation` this defines the element's position in its parent. This won't necessarily contain all the contents of an element, rotation and styling may cause the element to extend beyond this frame. Use `renderFrame` for an unrotated frame that contains the entire element.

get · iOS 27.0+

rotation

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

The element's rotation around the center of its frame. Together with `frame` this defines the element's position in its parent.

set · iOS 27.0+

rotation

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

The element's rotation around the center of its frame. Together with `frame` this defines the element's position in its parent.

get · iOS 27.0+

elementID

TypeScript
get elementID(): MarkupOrderedSet_ElementID
Swift declaration
var elementID: MarkupOrderedSet.ElementID { get }

The element identifier for use in a markup ordered set.

Skipped declarations

11 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UTType.paperkit

The iOS SDK compiler rejected this binding: cannot find 'UniformTypeIdentifiers' in scope

ShapeMarkup.Shape.rectangle

The iOS SDK compiler rejected this binding: ambiguous use of 'rectangle'

ShapeMarkup.Shape.ellipse

The iOS SDK compiler rejected this binding: ambiguous use of 'ellipse'

ShapeMarkup.Shape.star

The iOS SDK compiler rejected this binding: ambiguous use of 'star'

MarkupID.init()

The containing type needs Swift generic type arguments. (no canonical witness for Element)

MarkupOrderedSet.ElementID.init(_:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

MarkupOrderedSet.append(contentsOf:)

This parameter hides a concrete Swift type.

MarkupOrderedSet.removeElement(for:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

MarkupOrderedSet.subscript(_:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

protocol implementation PaperMarkupViewController.Delegate

synchronous protocol result requires an active JS-thread call; delegate invocations can escape it

protocol implementation Markup

non-method protocol requirement