tableView裏選中一行cell其它不選中的方法

方法1:table

#pragma mark--選中狀態select

 

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {方法

    GASSelectNextTableViewCell *cell = (GASSelectNextTableViewCell *)[tableView cellForRowAtIndexPath:indexPath];tab

    cell.selectedBtn.selected  = YES;di

    

    }void

-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {index

    GASSelectNextTableViewCell *cell = (GASSelectNextTableViewCell *)[tableView cellForRowAtIndexPath:indexPath];ab

    cell.selectedBtn.selected  = NO;

 

}

方法2:

1.定義一個全局的Button

2.讓後讓他選中

相關文章
相關標籤/搜索