• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: How do I debug weak_unregister_no_lock?
  • Next by Date: Re: UIPopoverController and UIToolbar interactions
  • Previous by thread: Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:
  • Next by thread: NSTableView, NSArrayController predicate, change data exception
  • Index(es):
    • Date
    • Thread