documentDidOpen()
Provides an opportunity to configure the view after the system loads the controller’s document into memory.
Declaration
func documentDidOpen()Mentioned in
Discussion
The system calls this method after the document view controller opens its document, or when an object assigns an already opened document to the document view controller’s document property. Override this method to customize the views that present your document in the view:
override func documentDidOpen() {
configureViewForCurrentDocument()
}Configure the view in its own method and call that method in both documentDidOpen() and viewDidLoad(). There is no timing guarantee between when the system calls documentDidOpen and when it loads the view controller’s view.