Get your own website
Demo.swift
ContentView.swift
App.swift
 
import SwiftUI

struct SafeAreaInsetDemo: View {
  var body: some View {
    ZStack {
      LinearGradient(colors: [.purple, .pink], startPoint: .top, endPoint: .bottom)
        .ignoresSafeArea()
      Text("Content").padding().background(.ultraThinMaterial, in: Capsule())
    }
    .safeAreaInset(edge: .bottom) {
      HStack {
        Image(systemName: "house.fill"); Spacer(); Image(systemName: "gear")
      }
      .padding()
      .background(.regularMaterial)
    }
  }
}

                    
import SwiftUI

struct ContentView: View {
  var body: some View { SafeAreaInsetDemo() }
}

                    
import SwiftUI

@main
struct MyApp: App {
  var body: some Scene { WindowGroup { ContentView() } }
}