Переглядів 19,659
Go to squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN.
Dependency Injection is when you give an object what it needs, rather than it creating those objects itself. In this video I show you a basic example using the Chipotle App as an example. And then I help you answer the common iOS Dev interview questions asking why would you use dependency injection in Swift and what are the benefits.
This tutorial was created using Xcode 14 and iOS 16.
My iOS Dev Courses:
seanallen.teachable.com/
iOS Developer Interview Questions Playlist:
• Swift Interview Tips
Twitter:
Sean Allen - / seanallen_dev
Hired.com:
hired.com/x/1n01g
Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
Paul Hudson's Hacking With Swift:
gumroad.com/a/762098803
Donny Wals - Combine:
gumroad.com/a/909014131
Mark Moeyken’s SwiftUI Books:
www.bigmountainstudio.com/swiftui-views-book/fzc51
Objc.io Books (Thinking in SwiftUI & Advanced Swift):
gumroad.com/a/656585843
#swift #softwaredeveloper #iosdeveloper
Timestamps:
0:00 - What is Dependency Injection
0:26 - Initializer Injection Code Example
4:19 - Benefits of Dependency Injection