title: How can i dynamically change the UISwitch of UITableView?
body: <p>I have a <code>UItableView</code> where every <code>UITableViewCell</code> is containing a <code>UISwitch</code> .Now my question is when i will click in one switch then how can i <code>OFF</code> other switches of the <code>UITableViewCell</code></p>
  
  <p>In my code i have already made the view and i can <code>ON/OFF</code> the switches.But i want to <code>OFF</code> all other switches except my selected switch.</p>
  
  <p>Please some help me by giving an example or source code example.</p>
  
  <p>With Best Regards</p>
  
  <p><strong>Edit</strong></p>
  
  <p>My Code:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  
      static NSString *CellIdentifier = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
      if (cell == nil) {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
          switchview = [[UISwitch alloc] initWithFrame:CGRectZero];
          cell.accessoryView = switchview;
          switchCondition = NO;
          [switchview setOn:NO animated:YES];
          [switchview addTarget:self action:@selector(updateSwitchAtIndexPath:) forControlEvents:UIControlEventValueChanged];
          [switchview release];
      }
      if(switchCondition == YES){
      [switchview setOn:YES animated:YES];
      }
  
      cell.selectionStyle = UITableViewCellSelectionStyleNone;
      cell.contentView.backgroundColor = [UIColor clearColor];
      cell.textLabel.text = [NSString stringWithFormat:@"%@",[cellValueArray objectAtIndex:indexPath.row]];
      return cell;
  }
  
  - (void)updateSwitchAtIndexPath:(UISwitch*)sender {
      if(sender.on){
          switchCondition = YES;
          [table reloadData];
      }
  }
  </code></pre>