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


valentin bancarel
valentin bancarel
4,459 Points

Correct way to implement a protocol in obj-c

Hello everybody, in my app I want to load data in different way, in order to do that I've thought about creating a protocol Loader, and some classes implementing it (NetLoader, JSONLoader, etc).As I want to respect good practices and apple's guidelines I think that is the good way to do. My problem is that: I don't know where to put the definition of the protocol?

Should I create an empty class Loader and define in it? But that would mean I could instantiate a Loader which I don't want.

Is there something I missed ? Where to define it ? Thanks.