title: Create editable UITextView inside a UITableViewController cell
body: <p>I created a uitextview inside a uitableviewcontroller programatically but i am unable to edit the textview. Here's an overview to my table layout:</p>
  
  <p>Row1: UILabel </p>
  
  <p>Row2: Uneditable UITextview</p>
  
  <p>Row3: UILabel</p>
  
  <p>Row4: Editable UITextview</p>
  
  <p>Here's what i am doing:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  { 
  UILabel *label = nil;
  static NSString *CellIdentifier = @"Cell";
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
  if(indexPath.row%2==0)
  {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
      label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, cell.frame.size.width, 50)];
      [label setBackgroundColor:[self.cellBackgroundColor objectAtIndex:indexPath.row]];
      [label setText:[self.celltitle objectAtIndex:indexPath.row]];
      label.font=[UIFont fontWithName:[self.cellFontName objectAtIndex:indexPath.row] size:[[self.cellFontSize objectAtIndex:indexPath.row] integerValue]];
  
      label.textAlignment = NSTextAlignmentLeft;
      [[cell contentView] addSubview:label];
  }
  else{
  
      UITextView *messageBox= [[UITextView alloc] initWithFrame:CGRectMake(0, 0, cell.frame.size.width, 150)];
     cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  
      cell.userInteractionEnabled=YES;
      if(indexPath.row==3)
      {
         [messageBox setEditable:YES];
  [messageBox setUserInteractionEnabled:YES];
          messageBox.delegate=self;
          messageBox.editable=YES;
      }
       [cell.contentView addSubview: messageBox];
  
  
  }
  return cell;}
  </code></pre>
  
  <p>I have also set textviewdelegate in header file and textviewshouldbeginediting method but row4 textview is still not editable... Any help?</p>