From the course: Programming for Non-programmers: iOS 17 and Swift 5
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Challenge: Clear button
From the course: Programming for Non-programmers: iOS 17 and Swift 5
Challenge: Clear button
- [Narrator] And now for the final challenge of the course. To write the functionality for the clear button. In order to finish the clear button, all we need to do is use the method that already exists to reset the app to its initial state. This challenge should just take a few minutes to complete. If you'd like some tips, stick around. First, we need to look at the starting values of all the variables, and then set those variables to their default values inside of the clear button method. Good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Storing the saved number5m 38s
-
(Locked)
Showing the total when the equals button is tapped3m 40s
-
(Locked)
Formatting the total number3m 3s
-
(Locked)
Replacing the mode buttons with symbols2m 50s
-
(Locked)
Adding an app icon1m 20s
-
(Locked)
Challenge: Clear button32s
-
(Locked)
Solution: Clear button1m 40s
-
(Locked)
-