- cell.selectionStyle = UITableViewCellSelectionStyleNone;
- /*Further, make sure you either don't implement -tableView:didSelectRowAtIndexPath: in your table view delegate or explicitly exclude the cells you want to have no action if you do implement it.*/
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- {
- // A case was selected, so push into the CaseDetailViewController
- UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
- if (![cell selectionStyle] == UITableViewCellSelectionStyleNone) {
- // Handle tap code here
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/131220138038.html
来源: http://www.codesnippet.cn/detail/131220138038.html