Domlin
Domlin

Reputation: 195

Can use core data to undo/redo in iOS/core graphics?

I'm trying to add an undo / redo capability to a set of touches..

I have some brushes painting on the screen.I know I can use an Array to solve this problem.But actually it is not that simple beacuse I will do some text typing.

I don't know if I can undo/redo using core data or NSUndoManager.

Anyone konws??Or some source code??

Upvotes: 0

Views: 261

Answers (1)

Monisha
Monisha

Reputation: 439

You can create and register managed objects with it, make changes to the objects, and undo and redo changes as you wish.

If you make changes to managed objects associated with a given context, those changes remain local to that context until you commit the changes by sending the context a save: message.

Upvotes: 3

Related Questions