Skip to content

tomhamming/TextViewUndo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TextViewUndo

Demonstrating a problem with NSUndoManager and UITextView

This project demonstrates an issue posted on Stack Overflow here and on Apple forums here. Basically, if you programmatically change the text of a UITextView, its undo manager seems to clear its undo stack, even if you undo your changes properly.

To repro:

  1. Run project
  2. Type some changes in the text view
  3. Tap the Emoji button, and an emoji is inserted
  4. Type some more changes
  5. Begin undoing all your changes

You can undo back to the addition of the emoji (because that operation is done through the undo manager), but no further. If at step 3 you select some text and add a strikethrough, though, you can undo all of your changes.

About

Demonstrating a problem with NSUndoManager and UITextView

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages