Wednesday, October 19, 2011

Application Design-Level Improvements

The following sections describe new capabilities that you can incorporate into the model, view, and controller layers of your application. Document Support Cocoa Touch now includes a UIDocument class for managing the data associated with user documents. If you are implementing a document-based application, this class reduces the amount of work you must do to manage your document data. In addition to providing a container for all of your document-related data, the UIDocument class provides built-in support for a number of features: Asynchronous reading and writing of data on a background queue, allowing your application to remain responsive to users while reading and writing operations occur. Support for coordinated reading and writing of documents, which is required for documents in iCloud storage. Safe saving of document data by writing data first to a temporary file and then replacing the current document file with it. Support for resolving conflicts between different versions of your document if a conflict occurs. Automatic saving of document data at opportune moments. Support for flat file and package file representations on disk. For applications that use Core Data to manage their content, there is also a UIManagedDocument subclass to manage interactions with documents in the database. If you are implementing an application that supports iCloud storage, the use of document objects makes the job of storing files in iCloud much easier. Document objects are file presenters and handle many of iCloud-related notifications that you might otherwise have to handle yourself.

No comments:

Post a Comment

Followers