Note that there are some explanatory texts on larger screens.

plurals
  1. POUITextView and the Mysterious Missing Space
    primarykey
    data
    text
    <p>I have an app with a handful of <code>UITextView</code>s of various sizes. It appears that if a <code>UITextView</code> small enough has a font.pointSize high enough, there's no way to add a space after the text is big enough to fill the text view.</p> <p><strong>For example:</strong></p> <p>I'm trying to figure out what was going on here, I starting typing my usual debug string, I typed "What" hit the space key and no space appeared (but this is usual). I typed "the" and the looked like it was tacked right onto the end of the previous word. Sure enough, there was no space. I could go back and add the space just fine and once I do add the space, I can add other spaces as word wrapping then becomes effective.</p> <p>Another mysterious behavior is that when you double tap space, it doesn't add a period to the end. It replaces the last character with a period. So, "What" + space + space becomes "Wha."</p> <p>Now, I'm doing some interesting things with the font size like I'm automatically resizing the font so that the text fills the space provided within reasonable bounds, but when I disable that, I can still reproduce the behavior. The only difference then is that instead of fitting on one line, the word wraps to the next line.</p> <p>For example, if I type "What" + space + "the" it comes out "Whatthe" with "What" on the first line and "the" on the second (though I can only see the tops of the "the." Further, here's some log information from the <code>textViewDidChange:</code>.</p> <pre><code>Character textView.text.length --------- -------------------- W 1 h 2 a 3 t 4 &lt;space&gt; 4 t 5 h 6 &lt;space&gt; 7 &lt;---- Here's a wierd one . . . now spaces all ? 8 work fine unless it's resizing </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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