Reputation: 77
I am beginner in iOS programming.
So, I want to change the text color when user click button.
My code:
- (IBAction)buttonGetText:(id)sender {
self.textChange.textColor = "red";
}
But it doesn't work. What do I need to do? Thank you everyone.
Upvotes: 0
Views: 688
Reputation: 20410
This:
self.textChange.textColor = "red";
Doesn't make sense, you need to use UIColor
.
Try this:
self.textChange.textColor = [UIColor redColor];
Upvotes: 1