title: Updating UISwitch when clicked inside a cell
body: <p>The problem I had before was if the person pressed <code>UISwitch</code> on and clicked into another cell and went back to the homepage, it would show all the buttons off. I am trying to update the switch that if the user presses on, it will stay on even if the user clicks on a different cell. This is what I have so far and I think I am very close. The problem is I don't know what type to make the ??? or what variable I should use. Am I going in the right step or will I face a problem by doing it this way? also do I need to <code>reloadData</code> the table?</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell" forIndexPath:indexPath];
  
      // Create a switch button on each cell
  
      UISwitch *switchView = [[UISwitch alloc] init];
  
      //[switchView setOn:NO animated:YES];
  
      [switchView addTarget:self action:@selector(updateSwitch:)forControlEvents:UIControlEventValueChanged];
  
       ??? = (switchView.on) ? YES : NO;
  
      cell.accessoryView = switchView;
  
      return cell;
  }
  
  - (void)updateSwitch:(id)sender
  {
      UISwitch *switcher = (UISwitch *)sender;
  
      if (switcher.on)
      {
          [switcher setOn: NO animated:YES];
          ??? = NO;
          NSLog(@"OFF");
      }
      else
      {
          [switcher setOn: YES animated: YES];
          ??? = YES;
          NSLog(@"ON");
      }
  }
  </code></pre>