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 Self-Destructing Message iPhone App Designing and Starting the App Adding Login and Sign Up Screens

IBAction defining methods

I simply don't know how to define the method (void)addSong with the given information. Any help would be appreciated!

1 Answer

Matthew Mascioni
Matthew Mascioni
20,444 Points

Hey Rafael,

I'll give you a few pointers :)

  1. Ignore the IBAction part of it. Threw me off the first time I read it. In this specific case, the IBAction part of it refers to how it exists in the header file, but we're working in the implementation file.

  2. In the first part of the challenge, it's basically asking you to write out the implementation of the addSong method (you don't have to make it do anything with it in the first part, though-- just start it out) Recall how to define instance methods in the implementation file:

- (returntype)methodName {
    // Things the method does!

Good luck! The second part of the challenge is much easier.