简体   繁体   English

如何在UITableView上更改Pull的文本颜色以刷新?

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

How can change the color of the text 'loading...'? 如何更改文本“正在加载...”的颜色?

在此处输入图片说明

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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM