Improved UITextView workaround available

102 views
Skip to first unread message

Greg Scown

unread,
Sep 11, 2013, 8:19:08 PM9/11/13
to tetou...@googlegroups.com
Dear TextExpander touch SDK Adopters,

We asked if you had a better workaround for forcing the UITextView to update when an expansion covers more than one line, and we're delighted to report that Greg Pierce of Agile Tortoise has offered an excellent one. His does not have any of the side effects of the one we initially provided to you, so we urge you to adopt it immediately. You can update tetestViewController.m from the GitHub repository, or you can replace the twiddleText method with the following:

- (void)twiddleText:(UITextView*)textView {

    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {

        [textView.textStorage edited:NSTextStorageEditedCharacters range:NSMakeRange(0, textView.textStorage.length) changeInLength:0];

    }

}


Thanks again for sharing this, Greg. We all appreciate it.

Please let us know if you have any questions: tetouch@smilesoftware.com

Regards,

Greg Scown for the TextExpander touch Team
tet...@smilesoftware.com

Reply all
Reply to author
Forward
0 new messages