Blur in swiftUI2.0

Swift 2 introduced a new modifier for blurring views, but sometimes this blur does not look quite right. So when blurring text, use the blur modifier. When blurring a background, use a ZStack with a UIViewRepresentable and pass it a blur view.

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: TabView with NavigationView

To have a TabView with a Navigation View, you have to wrap the pages in a TabView with their own NavigationView. First, Start off with a tab view with three pages: Next, wrap each of the TabView’s Items in their own NavigationView, and make sure to move the tab item to be an object of…

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…