2009-07-18 58 views

回答

0

假设你已经没有具体 的tableView didSelectRowAtIndexPath方法返回NO莫名其妙:indexPath,你不需要做任何事情,这是默认的行为。

2

您可以在选定的,像这样使用

[self tableView:self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForForRow:row inSection:section]]; 
0

您可以设置选择风格保持蓝色:

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { 
    cell.selectionStyle = UITableViewCellSelectionStyleBlue; 
} 

,并确保您不会去选择单元格:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 
    // This is what you DO NOT want to do 
    [tableView deselectRowAtIndexPath:indexPath animated:NO]; 
}