在我使用 Apples UIRefreshControl 之前,我可以在刷新控件的底部显示一个标签,如下所示:
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];