Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Special Custom Checkmark in UITableViewCell
- #define CHECKBOX_TAG 123
- UIView *customAccessoryView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 60, 30)] autorelease];
- UIImageView *otherInfo = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)] autorelease];
- UIImageView *checkbox = [[[UIImageView alloc] initWithFrame:CGRectMake(30, 0, 30, 30)] autorelease];
- checkbox.tag = CHECKBOX_TAG;
- [customAccessoryView addSubview:otherInfo];
- [customAccessoryView addSubview:checkbox];
- cell.accessoryView = customAccessoryView;
- UIImageView *checkbox = [cell.accessoryView viewWithTag:CHECKBOX_TAG];
- if(selected){
- checkbox.hidden = NO;
- }else{
- checkbox.hidden = YES;
- }
- @property(nonatomic) UITableViewCellAccessoryType accessoryType
- @property(nonatomic, retain) UIView *accessoryView
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement