Background Color with SwiftUI

Kristaps Grinbergs
Level Up Coding
Published in
4 min readDec 29, 2020

--

Once you create a SwiftUI view, it has the default background color, white for light mode and black for dark mode respectively. How can you change it to something different? Let’s look into that today.

Photo by AB on Unsplash.

In this article, we will talk about different techniques that we can use to change the default background for our SwiftUI views.

Using modifier

--

--

Blockchain, mobile and fullstack developer. Startup founder. Conference speaker. Mentor. Passionate about building products, sustainability and Web 3.0.