The amount to scale the view in the view in both the horizontal and vertical directions.
Instance Method
インスタンスメソッド
scale
scaleEffect(_:anchor:)
Scales this view’s rendered output by the given amount in both the horizontal and vertical directions, 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 パラメータ
s
anchor
The anchor point with a default of
center
that indicates the starting position for the scale operation.
Discussion 議論
Use scale
to apply a horizontally and vertically scaling transform to a view.
Image(systemName: "envelope.badge.fill")
.resizable()
.frame(width: 100, height: 100, alignment: .center)
.foregroundColor(Color.red)
.scaleEffect(2, anchor: .leading)
.border(Color.gray)