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 trialCaleb Kleveter
Treehouse Moderator 37,862 PointsWere do I go from here?
I'm not exactly sure what to do here:
Before we finish let’s also programmatically change the tint color of our button to something more appealing. I’ve set up a UIColor object for you to use and like last time, I want you to use the documentation or the Internet to figure out which method to use. Assign the redColor UIColor object to the tint property of the timerButton.
#import "UIViewController.h"
#import "UIButton.h"
@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet UIButton *timerButton;
@end
#import "ViewController.h"
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self.timerButton setTitle:@"Start!" forState:UIControlStateNormal];
UIColor *redColor = [UIColor redColor];
// Enter your code below!
}
@end
5 Answers
Patrick Cooney
12,216 PointsHere is the documentation page he mentions using. You want to find the the thing that will help you set the tint color of the button. Remember that properties can be set using dot notation.
Caleb Kleveter
Treehouse Moderator 37,862 PointsThanks, you got me on the right track.
Patrick Cooney
12,216 PointsNo problem. If you're still having issues just pop back in and ask for further support.
busterlabs
9,276 PointsWhat's the answer?
Patrick Cooney
12,216 PointsIf you follow the link I posted above it will take you right to the Apple provided documentation that will show you how to do this.
busterlabs
9,276 PointsI don't want the link. I saw that on my own. This challenge is so F***d up i just want to move on already. Do you have the answer? Yes, this is a cop out, but at this point, I really don't care anymore. Thanks, if you can help me
Patricio Vargas
4,665 Pointsthe question is wrong, because instead of changing the background color with setBackground you have to do the following it worked for me after different lines of code i input
self.timerButton.tintColor = redColor;
Will Lam
7,027 PointsUgh, these quizzes are really frustrating - while I understand their purpose.. the way they're worded is... less than ideal.
Caleb Kleveter
Treehouse Moderator 37,862 PointsI agree. Don't worry, the Objective-C challenges are the hard ones. All the other CCs are easy.