开发者社区 问答 正文

结束 `UIRefreshControl`

创建了没有TableViewController的UIRefreshcontrol,如何在另一个方法中结束它?这是创建方法:

UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
    [refreshControl addTarget:self action:@selector(handleRefresh) forControlEvents:UIControlEventValueChanged];
    [_tableView addSubview:refreshControl];

展开
收起
爵霸 2016-03-24 09:02:29 1875 分享 版权
1 条回答
写回答
取消 提交回答
  • UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
        [refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged];
        [_tableView addSubview:refreshControl];
    -
    
    -(void) handleRefresh:(UIRefreshControl *)controller
        {
            //Refresh code
            controller.endRefreshing;
        }
    2019-07-17 19:11:51
    赞同 展开评论
问答地址: