第一次启动UIRefreshControl时文本被错误地反映...稍后有时刷新文本根本没有出现,只有刺状是可见的
我不认为我对iOS6有这个问题...可能与iOS7有关
在UITableViewController中作为子项添加到VC中,它驻留在一个模态呈现的UINavigationController中
- (void)viewDidLoad {
[super viewDidLoad];
[self setRefreshControlText:@"Getting registration data"];
[self.refreshControl beginRefreshing];
}
- (void)setRefreshControlText:(NSString *)text {
UIFont * font = [UIFont fontWithName:@"Helvetica-Light" size:10.0];
NSDictionary *attributes = @{NSFontAttributeName:font, NSForegroundColorAttributeName : [UIColor blackColor]};
self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:text attributes:attributes];
}
Run Code Online (Sandbox Code Playgroud)