在我使用Apples UIRefreshControl之前,我可以在Refresh Control的底部显示标签,如下所示:
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
[refreshControl addTarget:self action:@selector(addReceipt:)
forControlEvents:UIControlEventValueChanged];
self.refreshControl = refreshControl;
NSString *s = @"Swipe Down to Add Receipt";
NSMutableAttributedString *a = [[NSMutableAttributedString alloc] initWithString:s];
[a addAttribute:NSForegroundColorAttributeName value:[UIColor darkGrayColor] range:NSRangeFromString(s)];
refreshControl.attributedTitle = a;
现在我为自定义活动指示器切换到ODRefreshControl,我无法找到解决方案! 我的ODRefreshControl代码(只是为了它的工作):
ODRefreshControl *refreshControl = [[ODRefreshControl alloc] initInScrollView:self.tableView];
[refreshControl addTarget:self action:@selector(dropViewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged];
答案 0 :(得分:0)
看起来这种控件不支持开箱即用的这类东西。看一看代码,它似乎不支持attributedTitle
或类似的东西。另外,我假设你正在使用这个控件:
https://github.com/Sephiroth87/ODRefreshControl
如果是这种情况,您可能有几个选择:
initWithScrollView
方法,但这可能不完全准确。ODRefreshControl
?