title: Avoid reload content on beginUpdates of UITableView iOS
body: <p>I have a cell with a textview and it has a <code>view more</code> button. When press this button the cell is expanding accordingly. I've called,</p>
  
  <pre><code>[self.parent.tableView beginUpdates];
  [self.parent.tableView endUpdates];
  </code></pre>
  
  <p>These methods are calling <code>cellForRowAtIndexPath</code>. In <code>cellForRowAtIndexPath</code> method I'm setting an initial height for the textview(height when text is shrink). When calling this with the beginUpdate the text view collapses automatically because text view is setting the initial height. </p>
  
  <p>I've tried to remove the <code>beginUpdates</code> but it shows only a part of the text. Not the full text. </p>
  
  <p><strong>in cellForRowAtIndexPath</strong> </p>
  
  <pre><code> if (self.postTextView.text.length &gt;= 100) {
      CGSize initialHeight = [self calculateHeightForString:(post.fullText.length &gt; 100)?[post.fullText substringToIndex:100]:post.fullText];
      self.textViewHeightConstraint.constant = initialHeight.height + 40;
  } else {
      CGSize initialHeight = [self calculateHeightForString:post.fullText];
      self.textViewHeightConstraint.constant = initialHeight.height + 40;
  }
  </code></pre>
  
  <p><strong>Shrinking Text</strong></p>
  
  <pre><code>UITextView *textView = (UITextView*)((UITapGestureRecognizer *)sender).view;
  OCPost *post = [self.parent._posts objectAtIndex:textView.tag];
  NSMutableAttributedString *answerAttributed = [[NSMutableAttributedString alloc] initWithString:post.fullText attributes:@{NSFontAttributeName : [UIFont fontWithName:@"SFUIText-Light" size:18.0], NSForegroundColorAttributeName:[UIColor blackColor]}];
  self.postTextView.attributedText = answerAttributed;
  self.textViewHeightConstraint.constant = [self fullHeightOfString:self.postTextView.attributedText].height + 40;
  [self.parent.tableView beginUpdates];
  [self.parent.tableView endUpdates];
  readMoreGesture.enabled = NO;
  </code></pre>
  
  <p>How may I fix this?</p>
  
  <p>Thanks in Advance!</p>