【发布时间】:2013-05-23 15:49:59
【问题描述】:
我的ViewController 中有一个UIRefreshControl 和一个方法refreshView 来处理“拉动刷新”事件。实际拉动时效果很好,但是当我在代码中调用[refresh beginRefreshing] 时,它只显示刷新动画但不调用refreshView 方法。
这里是viewDidload中初始化刷新控件的代码:
UIRefreshControl *refresh = [[UIRefreshControl alloc] init];
refresh.attributedTitle = [[NSAttributedString alloc] initWithString:@"Pull to Refresh"];
[refresh addTarget:self
action:@selector(refreshView:)
forControlEvents:UIControlEventValueChanged];
self.refreshControl = refresh;
【问题讨论】:
标签: ios pull-to-refresh uirefreshcontrol