Skip to content

Instantly share code, notes, and snippets.

@keicoder
Last active August 29, 2015 13:56
Show Gist options
  • Save keicoder/8860912 to your computer and use it in GitHub Desktop.
Save keicoder/8860912 to your computer and use it in GitHub Desktop.
objective-c : 테이블 뷰 delegate 메소드 (사용자가 테이블 셀을 선택할 수 없도록 하기)
#pragma mark - 테이블 뷰 delegate 메소드 (사용자가 테이블 셀을 선택할 수 없도록 하기)
//static 셀이므로 셀을 탭할 수 없도록 함
- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
return nil; //사용자가 테이블 셀을 선택할 수 없도록 하기
}
//one more thing to do. cell has a Selection Color property.Blue by default
//storyboard -> select the table view cell -> Attributes inspector -> Set Selection attribute to None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment