Shadros
Shadros

Reputation: 798

How can change the color of text of Pull to refresh on UITableView?

How can change the color of the text 'loading...'?

enter image description here

Upvotes: 1

Views: 2194

Answers (1)

Federico Picci
Federico Picci

Reputation: 1113

Try:

//the color of the background
self.refreshControl.backgroundColor = [UIColor purpleColor];

//the color of the spinner
self.refreshControl.tintColor = [UIColor whiteColor];

// the color of the label
NSString *title = @"loading...";
NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:[UIColor whiteColor]
                                                                    forKey:NSForegroundColorAttributeName];
NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:title attributes:attrsDictionary];
self.refreshControl.attributedTitle = attributedTitle;

Upvotes: 4

Related Questions