Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Lee Watts
40 PointsWhat is the technique of providing everything a class needs for instantiation as initialization arguments?
I've watched the first section of Building a Selfie App with Swift 2 ten times and can not figure out this get it right or get out question in the quiz. I thought it was dependency injection but no.
Anyone got this one?
5 Answers
durul
62,690 PointsAnswer is dependency Injection.
Lee Watts
40 PointsI know my question was long at 2 sentences. The second sentence I specifically state the answer is not dependency injection.
Adan Sandoval
1,213 PointsI was having the same problem. Thanks for bringing this up!
Steven Deutsch
21,046 PointsHey Lee Watts,
Unfortunately, I don't have a subscription right now so I don't have access to this quiz. I would try something along the lines of "Object Creation", "Object Initialization", "Object Instantiation", or "Class Instantiation". Let me know if anything works.
Good Luck
Alberto Medrano
12,926 PointsIs dependency injection.
Loes Shira
iOS Development Techdegree Student 392 PointsI'm stuck on this too - i've tried dependency injection but the quiz keeps saying its wrong.
Pablo Cornejo
10,404 PointsHey! I know this is an old question but I encountered this same problem just now. In my case I didn't realize that there are two fields to fill when answering the question. At first I typed "dependency injection" all in the first field (which triggers a wrong answer). That is the correct answer indeed, but be careful to type one word in each field.