Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (id)initWithStyle:(UITableViewStyle)style
- {
- self = [super initWithStyle:style];
- if (self) {
- NSLog(@"CALLED");
- // Custom initialization
- _dropDownSelection = [[VPPDropDown alloc] initSelectionWithTitle:@"Selection Combo"
- tableView:self.tableView
- indexPath:[NSIndexPath indexPathForRow:kRowDropDownSelection inSection:kSection1]
- delegate:self
- selectedIndex:1
- elementTitles:@"Option 1", @"Option 2", @"Option 3", nil];
- _dropDownDisclosure = [[VPPDropDown alloc] initDisclosureWithTitle:@"Disclosure Combo"
- tableView:self.tableView
- indexPath:[NSIndexPath indexPathForRow:kRowDropDownDisclosure inSection:kSection1]
- delegate:self
- elementTitles:@"Disclosure 1", @"Disclosure 2", @"Disclosure 3", @"Disclosure 4", @"Disclosure 5", nil];
- NSMutableArray *elts = [NSMutableArray array];
- for (int i = 1; i <= 4; i++) {
- // just some mock elements
- VPPDropDownElement *e = [[VPPDropDownElement alloc] initWithTitle:[NSString stringWithFormat:@"Element %d",i] andObject:[NSNumber numberWithInt:i]];
- [elts addObject:e];
- }
- _dropDownCustom = [[VPPDropDown alloc] initWithTitle:@"Custom Combo"
- type:VPPDropDownTypeCustom
- tableView:self.tableView
- indexPath:[NSIndexPath indexPathForRow:kRowDropDownCustom inSection:kSection2]
- elements:elts
- delegate:self];
- }
- return self;
- }
Advertisement
Add Comment
Please, Sign In to add comment