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 trialCharles Elek
108 PointsHaving difficulties creating a button with an "IBAction"
Heres what I have.
import "THViewController.h"
@implementation THViewController
- (IBAction)butonPresssed { @end
4 Answers
Stone Preston
42,016 Pointsyou are also misspelling button and pressed as well. you have butonPresssed, it needs to be buttonPressed
@implementation THViewController
- (IBAction)buttonPressed {
}
@end
Stone Preston
42,016 Pointsyou are missing your closing curly brace
try
@implementation THViewController
- (IBAction)buttonPressed {
}
@end
Parag Nair
2,269 PointsYou seem to have an opening curly brace "{" but no closing brace "}" While implementing a method the code needs an opening and closing crace with your actual implementation within e.g:
-(void)someAction{ //my implementation here }
Charles Elek
108 PointsHere What I Have.
<p>#import "THViewController.h"
@implementation THViewController
- (IBAction)butonPresssed {
}
@end</p>
```
Parag Nair
2,269 PointsOn now i see you have spelled buttonPressed wrong