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 system colors

Dark Mode system colors - iOS Tutorial

From the course: iPadOS 13 Development Essential Training

Start my 1-month free trial

Dark Mode system colors

- [Instructor] We looked at creating your own custom colors that adapt in light or dark mode. Apple actually has adapted older system colors to adapt as well, depending on the mode that the user is in. These colors are not what you might think. So for the color, if I do .green, for example, that color does not adapt based on light or dark mode. The color that you want comes from the UIColor Constructor, so I'm going to open the parentheses for foreground color again, and it asks for a color here, and I'm going to create the color that asks for another color which is a UIColor, and then in there type . and then the word system. And you'll see a list of these system colors, and these all adapt to light or dark mode, so I'm going to choose systemGreen there, and then I'm going to look at the preview. So we see this really nice green color here, and what's hard to tell very different green color right here. They sort of look…

Contents