From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Dark Mode in code

Dark Mode in code

- [Instructor] Getting ready for dark mode is more than storyboard. You can adapt your app in code as well. Let's take a look at a few places you'll want to make some changes in your code. So if I've downloaded the exercise file and headed to the storyboard, and I've rearranged my screen a little bit so we can see both X code and my simulator at the same time. And I can go ahead and run this. And my app works, and you can see that it's actually setting some code here, we can actually go in over here to the view controller to look at it. And then you can see the code here is setting colors. Now here's the fun part. If you look down here on the bottom, you'll find the environment overrides. You click on there, and go up here to interface style and turn that on, you can now go back and forth with dark mode. And so here it is in dark mode, here it is in light mode. And you can see, we got a lot of problems here. So this…

Contents