Created
December 24, 2013 02:44
-
-
Save keicoder/8108105 to your computer and use it in GitHub Desktop.
objective-c : put check mark on UITableView Cell (테이블 뷰에 체크마크 넣기)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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