Search
Rich's Mad Rants
Powered by Squarespace

Creating iOS 5 Apps Discussion > Pg 362 motionEnded calling undoManager undo

not sure if people has posted this earlier but found out that in motionEnded:(UIEventType)motion withEvent:(UIEvent*) we supposed to call below and NOT [self.undoManager undo].

//Only respond to shake events.
if (event.type == UIEventSubtypeMotionShake){
[self.weightHistory undo];
}

The way it says in the book doesn't work so instead if you call

[sel.weightHistory.undoManager undo] will work without giving any Alert to the user.

Thanks seems like my app is working. Only need to test the actual "Conflict" logic which is most disturbing to me!

April 22, 2012 | Unregistered CommenterGuru

Good catch. I added this to the errata.

Thanks,

-Rich-

April 23, 2012 | Registered CommenterRichard Warren