SwiftUI: Status Bar Text Color

To change the status bar text color, you need to edit the UIHostingController call in the SceneDelegate. You can do this by creating your own file, named: HostingController, and having that file contain the following code: and then in the scene delegate changing the line: To: And voila, you have changed the status bar style.

SwiftUI: NavigationView Background Color – Extending into Safe Area

When trying to change the background color of my navigationView, I would change the background color of the UINavgiationBarAppearence in the App Delegate. But the issue with that solution is it would leave a white bar at the top of the screen on the safe area. This looks okay, but the white bar at the…

SwiftUI: iPad Views Not Showing

With the release of SwiftUI, the idea was to have one programming language for all apple devices. One small detail a lot of people may look over is when building with NavigationViews, on iPhone they will always show up on the top of the screen like normal. But in iPadOS, the default style is for…

SwiftUI: Status Bar Translucency

When working on an app, I encountered an issue when wrapping NavigationViews in a TabView. The navigation bar would show the proper translucency when other views were scrolled behind it, but the status bar had a black background, (white when in light mode), that I could not get rid of. Before Code: Before Simulator: As…