From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

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

Code custom controls

Code custom controls

- [Instructor] In several places in our code, we will be inputting data to the application. As we've learned in this course, there are several controls we can use to do this, such as pickers and text fields. However, it is often easier to set up special views using those controls which handle certain aspects quickly and thus simplify your code. Let's take a look at a few of these that I created. Since you don't want to spend hours watching me type, I'll be using the completed version of the app from now on as I have up here on the screen right now and jump around in code, like a code review. In the download for the chapter, open the Completed folder and then the Davids Grindz folder and then open the code in Xcode. Where you open it up, you'll find that there's lots of folders in here. And the one we're going to be looking at first is this Views folder. And in there, you'll find one that says Controls. And there's all our controls. And I'm going to start here with the input fields…

Contents