LoginSignup
0
0

More than 1 year has passed since last update.

馴染みのないView・モディファイアの機能まとめ[SwiftUI]

Posted at

随時追加していきます

View

Divider()

区切り線を引く。

モディファイア

.offset()

viewの位置を指定する。
なお、その下に書いたモディファイアには位置指定は反映されない。

.offset(x:10,y:10)
.background(Color.orange) //これは位置移動しない

類似:.positon()

.clipShape()

画像の形を定める。

.clipShape(Circle()) //円の形
.clipShape(Capsule()) //カプセル型の形
.clipShape(Ellipse()) //楕円の形

類似:mark()

.stroke()

図形の外縁を作る。

.stroke(.white, lineWidth: 4)

.overlay{}

Viewを重ね合わせる。

.overlay {
            Circle().stroke(.white, lineWidth: 4)
        }
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0