Q:

iOS - How to populate UIPickerView?

I have an array from which I would like to store the data in a UIPickerView. This can be done programmatically or with the storyboard GUI. I cannot seem to find any way to do this simply? 
Jake

A:

Programmatically use:
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
{
   return 1; // For one column
}

-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
 return [array count]; // Numbers of rows
}

-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
     return [arrayObjectTitle objectAtIndex:row]; // If it's a string
}

