开发者

Question about UITableView

I have a UiTableView and the first cell is only showing information. The following cells are going to push new viewControllers to the window.

I don't want it to be possible to click on the first one, but the second cell (indexpath.row == 1) to be the first cell to click on...

Is th开发者_Go百科ere some property I can set to make that first cell "notChooseable"?


try:

if(indexPath.row == 0)
cell.userInteractionEnabled = NO;


- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  if (indexPath.row == 0) {
    return;
  }
  else {
    //perform pushing controllers
  }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜