title: UIPickerView goes back to row 0 when released
body: <p>I added a UIPickerView to a UITableViewCell. I am adding about 5 entries to it. Now when I try to select a value, the <code>- (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component</code> function is called with the correct row. But on the scrren the UIPickerView "scrolls" back to the first element and does not stick to the selected value.</p>
  
  <p>Anyone had the same problem?</p>
  
  <p>EventSelectCell.h</p>
  
  <pre><code>@class EventSelectCell;
  
  @protocol EventSelectCellDelegate &lt;NSObject&gt;
  
     - (void)selectedEvent:(Event*)selectedEvent;
  
  @end
  
  @interface EventSelectCell : UITableViewCell &lt;UIPickerViewDataSource, UIPickerViewDelegate&gt;
  
     @property (strong, nonatomic) id &lt;EventSelectCellDelegate&gt; delegate;
  
     @property (weak, nonatomic) IBOutlet UIPickerView *selectWheel;
  
  @end
  </code></pre>
  
  <p>EventSelectCell.m</p>
  
  <pre><code>#import "EventSelectCell.h"
  
  @implementation EventSelectCell
  {
      EventManager* eventManager;
      NSArray* listOfEvents;
  }
  
  - (void)awakeFromNib {
      self.selectWheel.delegate = self;
      self.selectWheel.dataSource = self;
  
      // get the EventManger
      eventManager = [EventManager sharedEventManager];
  
      listOfEvents = [eventManager getListOfEvents];
  
      [self.selectWheel reloadAllComponents];
  }
  
  - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
      [super setSelected:selected animated:animated];
  
      // Configure the view for the selected state
  }
  
  - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView {
  
      return 1;
  }
  
  - (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component {
  
      return [listOfEvents count];
  }
  
  - (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
      Event* selectedEvent = [listOfEvents objectAtIndex:row];
  
      return [selectedEvent name];
  }
  
  - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
      Event* selectedEvent = [listOfEvents objectAtIndex:row];
  
      [self.delegate selectedEvent:selectedEvent];
  }
  
  @end
  </code></pre>
  
  <p>the delegate</p>
  
  <pre><code>- (void)selectedEvent:(Event*)selectedEvent {
      [playersInGame removeAllObjects];
  
      [playersInGame addObjectsFromArray:[self.eventManager getPlayersInEvent:selectedEvent onlyActive:YES]];
  
      [selectedEvent setIsActive:[NSNumber numberWithInt:1]];
  
      activeEvent = selectedEvent;
  
      [self.tableView reloadData];
  }
  </code></pre>