How to hide the home indicator - SwiftUI

Sep 17, 2022 1 min read
How to hide the home indicator - SwiftUI
iOS 16+

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)
    }
}
Great! Next, complete checkout for full access to ArturoFM.
Welcome back! You've successfully signed in.
You've successfully subscribed to ArturoFM.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.