<分区>
<分区>
我有 viewController,还有一个 tableView,我想在其中添加拉动刷新,但它没有 propertyrefreshConroller,我需要做什么?
最佳答案
关于您的信息,Apple 不会在其对象库中发布 refreshControl。 您只需使用几行简单的代码即可添加:
UIRefreshControl *refresher=[[UIRefreshControl alloc] init];
[refresher addTarget:self
action:@selector(refreshData)
forControlEvents:UIControlEventValueChanged];
[tableView addSubview:refresher];
refreshData
是你的目标方法,在那里你可以做任何你想做的事。
关于ios - 如何将 "pull to refresh"添加到 tableView,而不是 UITableViewController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24581995/