Returns the pattern associated with a color in a pattern color space.
SDKs
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Graphics
Declaration
var pattern: CGPattern? { get }
Parameters
color
A color.
Return Value
The pattern for the specified color. You are responsible for retaining and releasing the pattern as needed.