title: UITableView and ViewDidLoad method
body: <p>In my app I have a UITableViewCobtroller which creates the table view with checkmark accessory type. Table View loads and works correctly. In didSelectRowAtIndex method I wrote method of adding data in sqlite dataBase:</p>
  
  <pre><code>        [self.dataBaseController openSettingsDB];
          [self.dataBaseController updateRecordIntoTableNamed:kTableName withField:kSField1Name fieldValue:newCell.textLabel.text];
          [self.dataBaseController closeDB];
  </code></pre>
  
  <p>It works well. So what I want is to retrieve the recorded data from dataBase and when the application is relaunched to select the row, that has the title, that I retrieved from sqlite dataBase.</p>
  
  <p>I tried this:</p>
  
  <pre><code>-(void)viewDidLoad
  {
      NSArray *array = [[NSArray alloc] initWithObjects:
                        kCourse1, kCourse2, kCourse3, kCourse4, kCourse5, kCourse6, nil];
      self.list = array;
      [self.dataBaseController openSettingsDB];
      [self.dataBaseController getRowFromTableNamed:kTableName whichRow:kSField1Name];
      self.chosenStr = self.dataBaseController.dataString;
      [lastIndexPath indexAtPosition:[array indexOfObjectIdenticalTo:self.chosenStr]];
      UITableViewCell *cell = [[UITableViewCell alloc] init];
      cell = [self.tableView cellForRowAtIndexPath:lastIndexPath];
      cell.accessoryType = UITableViewCellAccessoryCheckmark;
      [self.tableView reloadData];
      [array release];
      [super viewDidLoad];
  }
  </code></pre>
  
  <p>But it doesn't work. Please, suggest me any ideas. Thanks in advance.</p>
  
  <p>Alick</p>