Created
December 3, 2013 00:52
-
-
Save zaneclaes/7762013 to your computer and use it in GitHub Desktop.
This file contains 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
- (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