One Logo Pool Ball
_SpriteKit_SwiftUI · IOS API REFERENCE

SpriteView.Options

struct · iOS 14.0+ · SDK 27.1

struct Options

Option set that's used to customize how nodes will be displayed in the view.

Members (5)

get · iOS 14.0+

allowsTransparency

TypeScript
get allowsTransparency(): Promise<SpriteView_Options>
Swift declaration
static let allowsTransparency: SpriteView.Options

Toggles whether the view allows transparent rendering. This allows content under the view to show through if a non-opaque backgroundColor is set on the scene. Defaults to false.

get · iOS 14.0+

ignoresSiblingOrder

TypeScript
get ignoresSiblingOrder(): Promise<SpriteView_Options>
Swift declaration
static let ignoresSiblingOrder: SpriteView.Options

Ignores sibling and traversal order to sort the rendered contents of a scene into the most efficient batching possible. This will require zPosition to be used in the scenes to properly guarantee elements are in front or behind each other. This defaults to false, meaning that sibling order overrides efficiency heuristics in the rendering of the scenes in the view. Setting this to true for a complex scene may substantially increase performance, but care must be taken as only zPosition determines render order before the efficiency heuristics are used.

get · iOS 14.0+

shouldCullNonVisibleNodes

TypeScript
get shouldCullNonVisibleNodes(): Promise<SpriteView_Options>
Swift declaration
static let shouldCullNonVisibleNodes: SpriteView.Options

A Boolean value that indicates whether the view automatically culls non-visible nodes from the rendering tree.

init · iOS 14.0+

init

TypeScript
init(rawValue: number): Promise<SpriteView_Options>
Swift declaration
init(rawValue: Int)

Creates a new option set from the given raw value. This initializer always succeeds, even if the value passed as `rawValue` exceeds the static properties declared as part of the option set. This example creates an instance of `ShippingOptions` with a raw value beyond the highest element, with a bit mask that effectively contains all the declared static members. let extraOptions = ShippingOptions(rawValue: 255) print(extraOptions.isStrictSuperset(of: .all)) // Prints "true" - Parameter rawValue: The raw value of the option set to create. Each bit of `rawValue` potentially represents an element of the option set, though raw values may include bits that are not defined as distinct values of the `OptionSet` type.

get · iOS 14.0+

rawValue

TypeScript
getRawValue($self: SpriteView_Options): Promise<number>
Swift declaration
let rawValue: Int

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"

Skipped declarations

No declarations were skipped in this snapshot.

All _SpriteKit_SwiftUI types →