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 Swift 2.0 Protocols Swift 2.0 Protocols Creating a Protocol

What is the point of protocols?

Why do protocols exist? I know that they provide information for how something should be implemented, but if you have to associate a class or struct with a protocol, don't you already know how to implement the struct or class?

It might just be that I'm not seeing the necessity of it through this example in the video, but is anyone able to provide an example of where protocols are specifically helpful or necessary?

Thanks!

1 Answer

Well, Pasan seemed to answer my question a few videos down the line. Guess this thread is pointless.