In this video, Mark DiFranco implements the view controller logic. Learn how to use the classes that were created in earlier videos in a view controller. Notice how most of the code in the view controller is related to the user interface, and not the core logic of the app.
- [Instructor] Let's start by implementing view did load.…We'll make an extension for our view controller.…This will help us organize the functions better.…Let's implement view did load.…We'll use this to set the initial state…for all of our labels.…The first line should be calling super view did load.…Then we can loop over all the labels…in our speed labels property.…Let's set the text for the label to zero.…
We'll also set the speed view…height constraints constant to zero.…We also want to make sure that the status bar…is not shown on our view controller.…For that let's override the prefer…status bar hidden property.…We can simply return true.…Now let's update our view controller…to actually display some speed.…Let's add properties for a speed provider…and a speed checker.…
The type is SPD location speed provider…for the speed provider…and the speed checker is SPD location speed checker.…These will be forced unwrapped optionals,…because we don't have the actual implementation set yet.…We can use the did set observer to setup the delegate.…
- Why write unit tests?
- What is dependency injection?
- Using protocols to help with tests
- Handling external dependencies
- Anatomy of a test case
- Writing tests
- Analyzing code coverage
- Visualizing test results
- Writing and extending UI tests
Skill Level Intermediate
Core Data for iOS and macOS Enterprise Developerswith Jon Bott1h 46m Intermediate
Learning Server-Side Swift with Vaporwith Ron Buencamino1h 30m Intermediate
Swift 3 Essential Training: Beyond the Basicswith Scott Gardner2h 58m Intermediate
1. Dependency Injection
2. Using Protocols
3. Writing Tests
4. UI Tests
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.