I have a UIPickerview, which I was initially setting from viewDidLoad. It was working perfectly fine. 

But I want it to refresh it everytime I come back from another view, so I put in viewDidAppear

```
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

    NSLog(@"View will appear");
    [self loadthepicker];

}

-(void) loadthepicker
{

    pickerLoaderArray=[[NSMutableArray alloc] init];
    [pickerLoaderArray addObject:@"one"];
    [pickerLoaderArray addObject:@"two"];
    [pickerLoaderArray addObject:@"thee"];
    [pickerLoaderArray addObject:@"four"];

    [pickerView selectRow:0 inComponent:0 animated:NO];

}

-(NSInteger)numberOfComponentsInPickerView:(NSInteger)component
{

    return 1;

}

-(NSInteger)pickerView:(UIPickerView *)picker numberOfRowsInComponent:(NSInteger)component
{

    return [pickerLoaderArray count];

}

-(NSString *)pickerView:(UIPickerView *)picker titleForRow:(NSInteger)row forComponent:(NSInteger)component{

    return [pickerLoaderArray objectAtIndex:row];
}

```

Okay, I think I might have got the answer:

[pickerView reloadAllComponents];

I added this to loadthepicker function and it's working fine now. 

Is this the right way to do it?