【发布时间】:2013-10-07 21:55:15
【问题描述】:
第一次启动 UIRefreshControl 时文本偏移错误...稍后有时刷新文本根本不显示,只有刺可见
我认为 iOS6 没有这个问题...可能与 iOS7 有关
在作为子项添加到 VC 的 UITableViewController 中,它驻留在模态呈现的 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];
}
【问题讨论】:
-
是发生在模拟器上还是真机上?我在这个问题上花了几个小时,当我在真实设备上尝试相同的代码时,它运行得很顺利。
-
您找到解决方案了吗?我也遇到了同样的问题。
-
没有任何工作 100% :( 对我来说
-
@FelixGuerrero 看到答案,终于找到解决办法了
-
Apple 会解决这个问题吗?
标签: cocoa-touch uitableview ios7 uirefreshcontrol