UIRefreshControlを追加した
//設置
_refreshControl = [[UIRefreshControl alloc] init]; [_refreshControl addTarget:self action:@selector(refresh) forControlEvents:UIControlEventValueChanged]; //tableviewに追加 [self.tableView addSubview:_refreshControl];
- (void)refresh { //tableをリロードする [self.tableView reloadData]; [NSTimer scheduledTimerWithTimeInterval:1.f target:self selector:@selector(endRefresh) userInfo:nil repeats:NO]; } - (void)endRefresh { [_refreshControl endRefreshing]; }