An amount that represents the horizontal amount to scale the view. The default value is 1
.
Instance Method
インスタンスメソッド
scale
scaleEffect(x:y:anchor:)
Scales this view’s rendered output by the given horizontal and vertical amounts, relative to an anchor point.
このビューのもつ描出された出力をこの与えられた水平と垂直の量によって、あるアンカーポイントに関して、拡大縮小します。
Availability 有効性
- iOS 13.0+
- iPadOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
Technology
- Swift
UI
Declaration 宣言
Parameters パラメータ
x
.0 y
An amount that represents the vertical amount to scale the view. The default value is
1
..0 anchor
The anchor point that indicates the starting position for the scale operation.
Discussion 議論
Use scale
to apply a scaling transform to a view by a specific horizontal and vertical amount.
Image(systemName: "envelope.badge.fill")
.resizable()
.frame(width: 100, height: 100, alignment: .center)
.foregroundColor(Color.red)
.scaleEffect(x: 0.5, y: 0.5, anchor: .bottomTrailing)
.border(Color.gray)