UIDocument Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Abstract base class providing local and cloud-based management of Model data.
[Foundation.Register("UIDocument", true)]
public class UIDocument : Foundation.NSObject, Foundation.INSFilePresenter, Foundation.INSProgressReporting, IDisposable, UIKit.IUIUserActivityRestoring
[<Foundation.Register("UIDocument", true)>]
type UIDocument = class
inherit NSObject
interface INSFilePresenter
interface INativeObject
interface IDisposable
interface INSProgressReporting
interface IUIUserActivityRestoring
- Inheritance
- Derived
- Attributes
- Implements
Remarks
Application developers can subclass UIDocument to create objects that are "Model-Controllers" and relate to Model (domain) objects analogously to how UIViewController relate to UIViews. UIKit provides a number of functions, including background asynchronous reading and writing of application data, automatic and safe data-saving, storage that is automatically coordinated between the application sandbox and cloud services, etc.
At a minimum, application developers need to implement ContentsForType(String, NSError) (for storage) and LoadFromContents(NSObject, String, NSError) (for retrieval). Additionally, application developers need to manage the lifecyle of the UIDocument and this requires the application developer to set the preferred storage location, create a file URL, and discover, open, and close the file. Application developers should also track changes and resolve conflicts between document versions.
The members of this class can be used from a background thread.
Constructors
| Name | Description |
|---|---|
| UIDocument(NativeHandle) |
A constructor used when creating managed representations of unmanaged objects. Called by the runtime. |
| UIDocument(NSObjectFlag) |
Constructor to call on derived classes to skip initialization and merely allocate the object. |
| UIDocument(NSUrl) | |
Properties
| Name | Description |
|---|---|
| AccessibilityAttributedUserInputLabels | (Inherited from NSObject) |
| AccessibilityRespondsToUserInteraction | (Inherited from NSObject) |
| AccessibilityTextualContext | (Inherited from NSObject) |
| AccessibilityUserInputLabels | (Inherited from NSObject) |
| Class | (Inherited from NSObject) |
| ClassHandle |
The Objective-C class handle for this class. |
| DebugDescription | (Inherited from NSObject) |
| Description | (Inherited from NSObject) |
| DidMoveToWritableLocationNotification |
Notification constant for DidMoveToWritableLocation |
| DidMoveToWritableLocationOldUrlKey |
Represents the value associated with the constant 'UIDocumentDidMoveToWritableLocationOldURLKey'. |
| DocumentState | |
| FileModificationDate | |
| FileType | |
| FileUrl | |
| Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from NSObject) |
| HasUnsavedChanges | |
| IsDirectBinding | (Inherited from NSObject) |
| IsProxy | (Inherited from NSObject) |
| LocalizedName | |
| PresentedItemObservedUbiquityAttributes |
Gets the set of ubiquity attributes that will generate notifications if they are modified. |
| PresentedItemOperationQueue |
Gets the NSOperationQueue on which presenter-related methods are executed. |
| PresentedItemUrl |
Gets URL of presented item. |
| Progress | |
| RetainCount | (Inherited from NSObject) |
| SavingFileType | |
| Self | (Inherited from NSObject) |
| StateChangedNotification |
Notification constant for StateChanged |
| Superclass | (Inherited from NSObject) |
| SuperHandle |
Handle used to represent the methods in the base class for this NSObject. (Inherited from NSObject) |
| UndoManager | |
| UserActivity | |
| UserActivityDocumentUrlKey |
Gets the key that specifies the document's URL in the UserActivity property. |
| Zone | (Inherited from NSObject) |