Im trying to add an NSUndoManager to my program but im not sure how to register the methods with the manager using :
[myUndoManager registerUndoWithTarget:selector:object:];
what if i have the following method:
-(IBAction)tapButton:(id)sender {
myFoo++;
yourFoo++; //incrementing integers
fooFoo++;
}
how can i register this method with the undo manager? the object of the selector (sender) is not what i want to register. I need to decrement myFoo, yourFoo, and fooFoo with a single undo call.