Skip to content

Instantly share code, notes, and snippets.

@zaneclaes
Created December 3, 2013 00:52
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 zaneclaes/7762013 to your computer and use it in GitHub Desktop.
Save zaneclaes/7762013 to your computer and use it in GitHub Desktop.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
BBInputTableViewCell *cell = (BBInputTableViewCell *)[tableView dequeueCellOfClass:[BBInputTableViewCell class]];
cell.backgroundStyle = BBTableViewCellBackgroundStyleCard;
cell.backgroundColor = [UIColor clearColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
BBInputTableViewCellAttributes *attributes = [[BBInputTableViewCellAttributes alloc] init];
switch (indexPath.row) {
case BBDebugToolVagrant: {
[attributes setSwitchPrompt:@"Vagrant?" isOn:NO handlerBlock:^(id sender, BBInputTableViewCellAttributes *attributes, id value, id arguments) {
}];
[attributes setSwitchIsOn:NO];
} break;
case BBDebugToolLoadUser: {
[attributes setTextFieldPrompt:@"Load User:" placeholder:@"user ID" handlerBlock:^(id sender, BBInputTableViewCellAttributes *attributes, id value, id arguments) {
[self loadUser:value];
}];
[cell setAttributes:attributes];
} break;
case BBDebugToolLoadListing: {
[attributes setTextFieldPrompt:@"Load Listing:" placeholder:@"listing ID" handlerBlock:^(id sender, BBInputTableViewCellAttributes *attributes, id value, id arguments) {
[self loadListing:value];
}];
[cell setAttributes:attributes];
} break;
case BBDebugToolSkyTemple: {
[attributes setButtonPrompt:@"SkyTemple" infoText:@"" handlerBlock:^(id sender, BBInputTableViewCellAttributes *attributes, id value, id arguments) {
}];
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
} break;
default:
break;
}
[cell setAttributes:attributes];
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment