开发者

Question about UITableView

开发者 https://www.devze.com 2023-01-23 23:29 出处:网络
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 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

精彩评论

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