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

iOS Build a Selfie App with Swift 2 Taking a Selfie Recap: Taking a Selfie

What 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

Answer is dependency Injection.

I know my question was long at 2 sentences. The second sentence I specifically state the answer is not dependency injection.

I was having the same problem. Thanks for bringing this up!

Hey 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

I'm stuck on this too - i've tried dependency injection but the quiz keeps saying its wrong.

Hey! 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.