private var documentObserver: NSObjectProtocol?
override func viewDidLoad() {
super.viewDidLoad()
documentObserver = NotificationCenter.default.addObserver(
forName: Notification.Name.UIDocumentStateChangedNotification ,
object: document,
queue: OperationQueue.main,
using: { notification in
print("docuemntState Changed to \(self.document!.documentState)")
}
)
}
Я пытаюсь сделать это, но Xcode показывает мне ошибку:
Тип «Notification.Name» (он же «NSNotification.Name») не имеет члена
'UIDocumentStateChangedNotification'