One of the relative sizes provided by the image scale enumeration.
Instance Method
インスタンスメソッド
image
imageScale(_:)
Scales images within the view according to one of the relative sizes available including small, medium, and large images sizes.
ビュー内部の画像それらの拡大縮小を、小、中、そして大の画像サイズを含む利用可能な相対的サイズの1つによって行います。
Availability 有効性
- iOS 13.0+
- iPadOS 13.0+
- macOS 11.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
Technology
- Swift
UI
Declaration 宣言
Parameters パラメータ
scale
Discussion 議論
The example below shows the relative scaling effect. The system renders the image at a relative size based on the available space and configuration options of the image it is scaling.
VStack {
HStack {
Image(systemName: "heart.fill")
.imageScale(.small)
Text("Small")
}
HStack {
Image(systemName: "heart.fill")
.imageScale(.medium)
Text("Medium")
}
HStack {
Image(systemName: "heart.fill")
.imageScale(.large)
Text("Large")
}
}