From the course: iPadOS 13 Development Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dark Mode custom colors

Dark Mode custom colors - iOS Tutorial

From the course: iPadOS 13 Development Essential Training

Start my 1-month free trial

Dark Mode custom colors

- Another thing you could do, is to find custom colors for dark mode. So you can say, "I want to use a certain color for a UI element and it's going to behave this way in dark mode, and this way in light mode." So before we go into that, I want to go over to "item.swift". One of the recommendations for using images for icons when working with dark mode, is that Apple says, you should be using system images where possible. That's because those images are designed to adapt when you're in dark mode. So I've updated my data model with these system image strings and then in my content view, I'm displaying the image and the text in an HStack. So I'm going to resume so we can see what it looks like right now. Preview the application. And when I take a look at all the items, it look like that, in dark mode. So there are white and dark mode and then when I look at them in light mode, they are dark. And again I didn't have to…

Contents