Mark DiFranco covers how to use the SwinjectStoryboard framework to help inject classes into view controllers. Learn what property injection is, and why it's less safe than constructor injection.
- [Instructor] Let's take a look…at how we can use SwinjectStoryboard…to inject dependencies into our view controllers.…The SwinjectStoryboard framework provides special subclass…of storyboard that helps us with injection.…Since the storyboard initializes…the view controllers itself, we must resort…to property injection in order to provide view controllers…with their dependencies.…Property injection is injecting dependencies by setting them…on properties of a class after it has been initialized.…This is less safe than constructor injection,…since we can't guarantee the properties…will be set after the class has been constructed.…
Let's head back over to the project…and use SwinjectStoryboard on our view controllers.…
- 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
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.