在我的应用程序中,我有一个继承自UITextView
的类,我需要在屏幕上创建和销毁此视图的许多实例。所以我的问题 - 有没有办法保存(在销毁之前)然后恢复(创建之后)每个实例的撤销/重做堆栈?
// After creation should be restoring like this.
// (This doesn't work certainly as undoManager is a readonly property)
self.undoManager = storedUndoManager;