A progress object that tracks a document as it loads.
- iOS 11.0+
- Mac Catalyst 13.0+
This property defaults to
nil. If this property is set, the document browser modifies the document's thumbnail to show the loading progress.
Use this animation for documents that can take a noticeable amount of time to load.
To set up this animation:
Get a transition controller for the document.
Progressobject to track the document as it loads. Be sure to keep a strong reference to the transition controller until the animation is complete.
Begin loading the document.
When the load action is complete, present the document.
Listing 1 provides the loading animation when opening a document. Note that because
UIDocument uses file coordination, the system may delay opening the file until it is available and ready to use. For example, the
open(completion method can trigger the download of a remote file, and the system won't call the completion handler until the download is complete.