Note that there are some explanatory texts on larger screens.

plurals
  1. POLive resizing of UITableViewCell without using reloadData?
    text
    copied!<p>First of all, forgive me if the answer is already out there (I honestly have been working and searching for about two weeks).</p> <p>And now, the situation:</p> <p>I have a <code>UITextView</code> as a subview of a <code>UITableViewCell</code> in a <code>UITableView</code>. The <code>UITextView</code> is the first responder (while user is typing).</p> <p>I have it set up (through delegate protocol methods) so that after each typed character, the cell's <code>rowHeight</code> is recalculated (correctly and in the tableViews delegate protocol for rowHeight). So far everything is fine.</p> <p>Then, I want that cell to be reloaded (or refreshed, whatever the term may be) <em>without</em> resigning its subview, <code>UITextView</code>, as first responder. </p> <p>A non-satisfactory solution around the problem:</p> <p>I am able to use <code>[tableView reloadData]</code> and then <code>[textView becomeFirstResponder]</code> to <em>simulate</em> this (so that user doesn't even notice that the textView was reloaded) and the rowHeight is perfect, but this has been causing me a lot of problems (especially with making sure that the cursor does not jump to the end every time the user types a character <em>and</em> with autocorrect forcefully enforcing its suggestions due to textView resigning).</p> <p>Is there a way to redraw or resize a <code>UITableViewCell</code> (to dynamically change its <code>rowHeight</code>) without causing any of its subviews to resign as first responder?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload