Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
- Subject: Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
- From: Matt Neuburg <email@hidden>
- Date: Tue, 14 Jan 2014 20:36:58 -0800
On Mon, 13 Jan 2014 16:21:46 +0100, Markus Spoettl <email@hidden> said:
>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?
I don't understand why, if you want to save, you don't just *save*. Mean what you say, say what you mean. Don't beat around the bush with some "change count" thing that's only indirectly related to what you want to do. Here's the code from my book:
- (void) forceSave: (id) n {
[self.doc saveToURL:doc.fileURL
forSaveOperation:UIDocumentSaveForOverwriting
completionHandler:nil];
}
m.
--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do
iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
_______________________________________________
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