【发布时间】:2016-07-21 09:25:10
【问题描述】:
是否可以在 UIRefreshControl 标题出现在屏幕上之前更改它?
实际上,我使用这段代码来更改我的更新方法中的标题:
NSString *refreshControlTitle = @"Pull to refresh...No new item to show";
NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:[UIColor colorWithRed:0.35 green:0.78 blue:0.98
alpha:1.0]
forKey:NSForegroundColorAttributeName];
NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:refreshControlTitle attributes:attrsDictionary];
refreshControl.attributedTitle = attributedTitle;
(根据情况会进行一些文本更改),但仅在刷新完成后文本才会更改。
如何在用户开始看到 refreshControl 之前实现文本?
提前致谢!
【问题讨论】:
-
你在哪里调用了这个刷新方法
-
看到这个对你有帮助的时候stackoverflow.com/questions/19121276/…
-
@Anbu.Karthik 我从 scrollViewDidEndDecelerating 调用我的刷新方法,但提供的链接对我没有帮助:/
标签: ios objective-c uirefreshcontrol