title: UITableView scroll to specific section using UIPIckerView?
body: <p>I have a UITableView that has a fixed number of sections, however the number of rows in each section can vary depending on server results. </p>
  
  <p>I would like to implement a picker wheel to "jump" to each section. Here are my UIPickerView delegate methods in the UITableViewController:</p>
  
  <pre><code>- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
  
  return 1;
  
  }
  
  - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
  return 5;
  }
  
  -(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
  return [self.pickerArray objectAtIndex:row];
  }
  </code></pre>
  
  <p>The "pickerArray" which is initialized in ViewDidLoad:</p>
  
  <pre><code>self.pickerArray = [[NSArray alloc]initWithObjects:@"Watching", @"Completed", @"On Hold", @"Dropped", @"Planned", nil];
  </code></pre>
  
  <p>and here's my didSelectRow method:</p>
  
  <pre><code>-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
  [self.tableView scrollToRowAtIndexPath:[self.pickerArray objectAtIndex:row] atScrollPosition:UITableViewScrollPositionNone  animated:YES];
  }
  </code></pre>
  
  <p>I noticed there's no "scrollTo*<em>section</em>*AtIndexPath" method, which would be helpful. Apple's docs say this about the "indexpath" parameter:</p>
  
  <pre><code>indexPath
  An index path that identifies a row in the table view by its row index and its section index.
  </code></pre>
  
  <p>Calling the method (picking something in the picker) throws this fault:</p>
  
  <blockquote>
    <p><em>*</em> Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString
    section]: unrecognized selector sent to instance 0x4bdb8'</p>
  </blockquote>
  
  <p>Any idea what I should be doing?</p>