Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/112.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 我怎样才能加上?’;“拉动以刷新”;是到tableView,不是到UITableViewController?_Ios_Objective C_Uitableview_Uirefreshcontrol - Fatal编程技术网

Ios 我怎样才能加上?’;“拉动以刷新”;是到tableView,不是到UITableViewController?

Ios 我怎样才能加上?’;“拉动以刷新”;是到tableView,不是到UITableViewController?,ios,objective-c,uitableview,uirefreshcontrol,Ios,Objective C,Uitableview,Uirefreshcontrol,我有viewController,还有一个tableView,我想在其中添加pull来刷新,但它没有属性RefreshConRoller,我需要做什么?关于你的信息,苹果没有在其对象库中发布refreshControl。 只需使用几行简单的代码即可添加: UIRefreshControl *refresher=[[UIRefreshControl alloc] init]; [refresher addTarget:self action:@selector(ref

我有viewController,还有一个tableView,我想在其中添加pull来刷新,但它没有属性RefreshConRoller,我需要做什么?

关于你的信息,苹果没有在其对象库中发布refreshControl。 只需使用几行简单的代码即可添加:

UIRefreshControl *refresher=[[UIRefreshControl alloc] init]; 
[refresher addTarget:self
              action:@selector(refreshData)
    forControlEvents:UIControlEventValueChanged];

[tableView addSubview:refresher];
其中,
refreshData
是您的目标方法,您可以在那里做任何您想做的事情