Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 18th, 2012  |  syntax: None  |  size: 0.89 KB  |  hits: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. - (void)selectTable:(TITable *)table {
  2.     TIPickerViewController *viewController;
  3.     NSMutableArray *titles;
  4.     TISection *section;
  5.    
  6.     viewController = (TIPickerViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"Picker View"];
  7.     viewController.delegate = self;
  8.    
  9.     titles = [[NSMutableArray alloc] initWithCapacity:[[TableIQ shared].site.waitStationTemplate.sections count] + 1];
  10.    
  11.     [titles addObject:@""];
  12.    
  13.     for (section in [TableIQ shared].site.waitStationTemplate.sections)
  14.         [titles addObject:section.name];
  15.    
  16.     viewController.titles = titles;
  17.    
  18.     // HERE
  19.     tablePopoverController = [[UIPopoverController alloc] initWithContentViewController:viewController];
  20.     [tablePopoverController presentPopoverFromRect:table.frame inView:floorplanView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
  21. }