Initializer

init(_:scale:orientation:label:)

Creates a labeled image based on a Core Graphics image instance, usable as content for controls.

Declaration 宣言

init(_ cgImage: CGImage, scale: CGFloat, orientation: Image.Orientation = .up, label: Text)

Parameters パラメータ

cgImage

The base graphical image.

scale

The scale factor for the image, with a value like 1.0, 2.0, or 3.0.

orientation

The orientation of the image. The default is Image.Orientation.up.

label

The label associated with the image. 画像と結びつけられたラベル。 SwiftUI uses the label for accessibility.

See Also 参照

Creating an Image for Use as a Control