One Logo Pool Ball
CoreGraphics · IOS API REFERENCE

CGGradient

class · SDK 27.1

class CGGradient

Members (5)

init · iOS 2.0+

init

TypeScript
static initColorSpaceColorComponentsLocationsCount(space: CGColorSpace, components: "animatableData" | SDKHandle, locations: ("animatableData" | SDKHandle) | null, count: number): (CGGradient) | null
Swift declaration
init?(colorSpace space: CGColorSpace, colorComponents components: UnsafePointer<CGFloat>, locations: UnsafePointer<CGFloat>?, count: Int)
init · iOS 2.0+

init

TypeScript
static initColorsSpaceColorsLocations(space: (CGColorSpace) | null, colors: _CoreFoundation_CFArray, locations?: ("animatableData" | SDKHandle) | null): (CGGradient) | null
Swift declaration
init?(colorsSpace space: CGColorSpace?, colors: CFArray, locations: UnsafePointer<CGFloat>?)
init · iOS 26.0+

init

TypeScript
static initHeadroomColorSpaceColorComponentsLocationsCount(headroom: number, space: CGColorSpace, components: "animatableData" | SDKHandle, locations: ("animatableData" | SDKHandle) | null, count: number): (CGGradient) | null
Swift declaration
init?(headroom: Float, colorSpace space: CGColorSpace, colorComponents components: UnsafePointer<CGFloat>, locations: UnsafePointer<CGFloat>?, count: Int)
get · iOS 26.0+

contentHeadroom

TypeScript
get contentHeadroom(): number
Swift declaration
var contentHeadroom: Float { get }
get · iOS 2.0+

typeID

TypeScript
static get typeID(): number
Swift declaration
class var typeID: CFTypeID { get }

Skipped declarations

No declarations were skipped in this snapshot.

All CoreGraphics types →