Skip to content

Instantly share code, notes, and snippets.

@chrisschreiner
Created September 28, 2011 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisschreiner/1247219 to your computer and use it in GitHub Desktop.
Save chrisschreiner/1247219 to your computer and use it in GitHub Desktop.
///
- (ConfigureCellBlock)dimmedCell {
return [[^(UITableViewCell *cell) {
cell.backgroundColor = [self colorFor:@"sub.cell.background"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
} copy] autorelease];
}
///
- (ConfigureBadgeBlock)standardBadge {
return [[^(IANumberBadgeView *b) {
b.borderWidth = 0;
b.shadow = YES;
b.shine = NO;
b.strokeColor = [self colorFor:@"standard.badge.border"];
b.fillColor = [self colorFor:@"standard.badge.background"];
b.textColor = [self colorFor:@"standard.badge.text"];
} copy] autorelease];
}
/// ···
id itemWithBadge3 = [viewFactory
textItemWithBadge:^(AbstractTableViewCellProxy *item) {
item.prompt = @"Sensitivity";
item.configureCellBlock = viewFactory.dimmedCell;
item.badgeValue = @"3872";
item.configureBadgeBlock = viewFactory.standardBadge;
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment