How to Hide Home Indicator In SwiftUI ?

iOS 16 Solution

To Hide Bottom home indicator line on SwiftUI use  .persistentSystemOverlays(.hidden). It also support animation. First it will show dark & turns to light gray with animation.

struct ContentView: View {
    var body: some View {
        Text("iPhone Home Indicator is Hidden👇🏽")
            .persistentSystemOverlays(.hidden)
    }
}

Leave a Comment

Your email address will not be published. Required fields are marked *