1
我想将NSUndoManager
添加到我的程序中,但我不确定如何向管理器注册方法?使用:如何使用NSUndoManager实现撤消?
[myUndoManager registerUndoWithTarget:selector:object:];
如果我有以下方法:
-(IBAction)tapButton:(id)sender {
myFoo++;
yourFoo++; //incrementing integers
fooFoo++;
}
我怎样才能注册此方法与撤消管理器?选择器(发件人)的对象不是我想要注册的。我需要用一次撤消调用来减少myFoo,yourFoo和fooFoo。
是的,工作就像一个魅力!日Thnx – RAV 2010-09-01 13:01:24