title: iOS : how to enable/disable textview's editable property on click of button
body: <p>I am creating a editable table view where user can enter its values into tableview cells. Table view custom cells contains multiple textview. I have a button like Edit/Done. On click of edit, user should be able to enter values in table view cells containing textview. On Done click, it will disable editable property.</p>
  
  <p>below is my method of Edit/Delete button, but its not functioning as I am wishing to, what will be the possible solution ?</p>
  
  <pre><code>- (IBAction) toggleEdit:(id)sender {
      [self.tableview setEditing:!self.tableview.editing animated:YES];
  
      static NSString *simpleTableIdentifier = @"ScoreCustomCell";
  
      ScoreCustomCell *cell = (ScoreCustomCell *)[self.tableview dequeueReusableCellWithIdentifier:simpleTableIdentifier];
      if (cell == nil)
      {
          NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"ScoreCustomCell" owner:self options:nil];
          cell = [nib objectAtIndex:0];
      }
  
      if (self.tableview.editing) {
          NSString *tempStr=[NSString stringWithFormat:@"Done"];
          [sender setTitle:tempStr  forState:UIControlStateNormal];
          for (int i=0; i&lt;=23; i++) {
              if (cell.scoreText.tag==i) {
                  [self.tableview setUserInteractionEnabled:YES];
                  [cell setUserInteractionEnabled:YES];
                  cell.scoreText.editable=YES;
                  [cell.scoreText setUserInteractionEnabled:YES];
                  [cell.scoreText becomeFirstResponder];
                  [self.tableview reloadInputViews];
              }
          }
  
      }
      else {
          NSString *tempStr2=[NSString stringWithFormat:@"Edit"];
          [sender setTitle:tempStr2  forState:UIControlStateNormal];
          for (int i=0; i&lt;=23; i++) {
              if (cell.scoreText.tag==i) {
                  cell.scoreText.editable=NO;
                  [self.tableview reloadInputViews];
  
              }        }
      }
  }
  </code></pre>