title: Fill picker view with values from a mutable array
body: <p>I have 2 buttons and 2 mutable arrays. When I push one of the two buttons I want to fill up a <code>UIPickerView</code> with the corresponding array. But the problem is that you can only implement one time the picker view Methods. So now I want to check which button is pressed and then fill up my picker view with the corresponding array. Anyone got an idea?</p>
  
  <pre><code>-(IBAction)setPicker:(id)sender{
  
      if (sender == btncategorie){
          [self fillArrayCategorie];
      }
      else {
          [self fillArrayHomeparty];
      }
  
      if (pickview.hidden == TRUE) {
           [pickview setHidden:NO];
          [pickview reloadAllComponents];
      }else {
           [pickview setHidden:YES];
  
          [pickview reloadAllComponents];
      }
  }
  
  - (NSString *)pickerView:(UIPickerView *)pickview titleForRow:(NSInteger)row forComponent:(NSInteger)component{
  
      return [arrayHomeParty objectAtIndex:row];
  
  }
  - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
  {
      [pickview setHidden:YES];
      homLabel.text= [arrayHomeParty objectAtIndex:row];
  }
  
  - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickView{
      return 1;// assuming a single spinning wheel of strings (not split into left/right for example)
  }
  
  -(NSInteger)pickerView:(UIPickerView *)pickview numberOfRowsInComponent:(NSInteger)component{
      return [arrayHomeParty count];
  }
  </code></pre>
  
  <p>This is my code to fill up the arrays. The question is how I can say in my pickerview methods that they should use the arrayHomeparty when the homeparty button is pressed and that the pickerviewer should fill up with the arrayCategorie when the category button is pressed.</p>