Skip to content

Instantly share code, notes, and snippets.

@keicoder
Created December 24, 2013 02:44
Show Gist options
  • Save keicoder/8108105 to your computer and use it in GitHub Desktop.
Save keicoder/8108105 to your computer and use it in GitHub Desktop.
objective-c : put check mark on UITableView Cell (테이블 뷰에 체크마크 넣기)
put check mark on UITableView Cell (테이블 뷰에 체크마크 넣기)
//first :
//Add a new label to the cell to the left of the text label. Give it the following attributes:
//Text: √ (you can type this with Alt/Option+V) • Font: System Bold, size 22
//Autoshrink: No
//Highlighted color: White
//Tag: 1001 //give label its own tag, so can easily find it later.
- (void)configureCheckmarkForCell:(UITableViewCell *)cell withChecklistItem:(ê ChecklistItem *)item {
UILabel *label = (UILabel *)[cell viewWithTag:1001];
if (item.checked) {
label.text = @"√";
} else {
label.text = @"";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment