Undo/redo with a UITextView (iOS/iPHone)

后端 未结 3 1804
逝去的感伤
逝去的感伤 2020-12-15 01:49

I have a view where a UITextView always has focus. What I want to do is extend the built-in undo/redo behavior to support undo/redo for when I programmatically set the text

3条回答
  •  半阙折子戏
    2020-12-15 02:33

    I'm not sue how many Text Fields you are working with, though textBackup is not getting retained by prepareWithInvocationTarget: How is it still in the Undo Stack several clear's later? Seems like it might still be there after the first one, though not after the 2nd one or after the Autorelease pool flushes.

提交回复
热议问题