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 trialRyan Cocuzzo
1,206 PointsThe error message is saying I am not addressing the text aspect of quoteLabel. Anybody got any ideas?
import "THViewController.h"
@implementation THViewController
// Add your code below
- (IBAction) buttonPressed { @property (strong, nonatomic) IBOutlet UILabel *quoteLabel; self.quoteLabel.text = @"The road to success is always under construction"; }
@end
1 Answer
Stone Preston
42,016 Pointsoutlet (and properties in general) declarations do not go in implementations. they go inside interface declarations. remove the outlet declaration from the buttonPressed method. You can assume the outlet is already declared in a header file. you dont need to add it yourself.
#import "THViewController.h"
@implementation THViewController
// Add your code below
- (IBAction) buttonPressed {
self.quoteLabel.text = @"The road to success is always under construction";
}
@end