Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
- Subject: Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
- From: Mike Abdullah <email@hidden>
- Date: Mon, 13 Jan 2014 16:21:24 +0000
On 13 Jan 2014, at 15:21, Markus Spoettl <email@hidden> wrote:
> Hi,
>
> I have an app that uses UIDocument and NSUndoManager. That way the system picks up changes to the data and knows when to auto-save.
>
> Some parts of the model are not using the undo manager (mostly settings where undo makes no sense or isn't wanted). Still that data is stored alongside the main data.
>
> What I want is that iOS saves whenever the app is backgrounded.
>
> So the questions is: Can I safely call -updateChangeCount: when my app is being sent to the background alongside the automatic NSUndoManager change handling?
>
> It seems to work quite nicely (when called from the app delegate's -applicationWillResignActive:), but I'm not sure if that's just an illusion and there's trouble waiting down the road.
>
> Any thoughts?
By my understanding, you’re free to mix the two. UIDocument’s NSUndoManager integration should be implemented simply by calling through to -updateChangeCount: anyway.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden