On Mon, 13 Jan 2014 16:21:46 +0100, Markus Spoettl <ms_li...@shiftoption.com> 
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 = m...@tidbits.com, 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to