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 trialBen Bastow
24,657 PointsAdding Login and Sign Up HELP!
Hi..
I think i understand the task but this is my code of it
"In the view controller below about songs, tapping on a button to add a new song needs to perform a segue to another view controller. The button is wired up to an IBAction with the signature '- (void)addSong'. Start by defining this method."
i did this
- (void) addSong {}
why doesn't it work? im really confused..
4 Answers
Robert Bojor
Courses Plus Student 29,439 PointsHi Ben,
It works with void and IBAction
- (IBAction)addSong{}
Christopher Hall
9,052 PointsDid you add the minus sign before the (void)?
- (void)addSong {}
Ben Bastow
24,657 PointsI added the minus sign and i did it exactly like that! and it says this " Compilation error! Check your syntax: all you need is the correct method stub that matches the signature above. Don't forget your curly braces! "
Ben Bastow
24,657 PointsIt was my browser :/ cause i switched to safari and it worked! thanks so much! :)
Ben Bastow
24,657 PointsIt was my browser :/ cause i switched to safari and it worked! thanks so much! :)
Ben Bastow
24,657 PointsBen Bastow
24,657 PointsIve just tried that and it still doesn't work? it says this :Compilation error! Check your syntax: all you need is the correct method stub that matches the signature above. Don't forget your curly braces!"
Robert Bojor
Courses Plus Student 29,439 PointsRobert Bojor
Courses Plus Student 29,439 PointsThat's strange, I just tested it in the Code Challenge and it passed without problems...
https://www.dropbox.com/s/s11dz7txoxpujgy/Screenshot%202014-07-25%2011.36.48.png
and also with void instead of IBAction
https://www.dropbox.com/s/k8w4v0i12elwo32/Screenshot%202014-07-25%2011.37.42.png