方法
セーフエリアを非表示にするには、EdgeIgnoringSafeAreaモディファイアを使用します。
func edgeIgnoringSafeArea( _ edges : Edge.set ) -> some View
引数のegdesには、セーフエリアを非表示にする場所を指定します。
次の場所を指定することが出来ます。
- .top(上)
- .bottom(下)
- .leading(左)
- .trailing(右)
- .horizontal(左右)
- .vertical(上下)
- .all(全方向)
以下は、実際の使用例です。
//上
View()
.edgeIgnoringSafeArea(.top)
//左右
View()
.edgeIgnoringSafeArea(.horizontal)
//全て
View()
.edgeIgnoringSafeArea(.all)
まとめ
セーフエリアを非表示にするには、EdgeIgnoringSafeAreaモディファイアを使用します。
コメント