获取当前屏幕🉑️的cell

2017-04-18  本文已影响0人  大鹏你我他

NSArray *array = [self.tableVeiw visibleCells];//获取正在使用的 cell

for (UITableViewCell  *cell in array) {

UIButton *buton = (UIButton *)[cell viewWithTag:101];

buton.selected = NO;

}

UITableViewCell *cell =  [tableView cellForRowAtIndexPath:indexPath];

UIButton *buton = (UIButton *)[cell viewWithTag:101];

buton.selected = YES;

上一篇 下一篇

猜你喜欢

热点阅读