Posts

Post not yet marked as solved
1 Replies
Ok seems I have to change presentDocument to: func presentDocument(at documentURL: URL) { let navVC = UINavigationController() let doc = Document(fileURL: documentURL) let docVC = UIDocumentViewController(document: doc) navVC.modalPresentationStyle = .fullScreen navVC.addChild(docVC) present(navVC, animated: true, completion: nil) } So embed the UIDocumentViewController inside a UINavigationController.
Post not yet marked as solved
2 Replies
I'm guessing right now the best you can do is present the onboarding when the user opens/creates a document for the first time. Not so bad really.
Post not yet marked as solved
1 Replies
And as far as my trails, the ReferenceFileDocument cannot trigger any write operation :(*. You have to call registerUndo on the UndoManager in the environment to trigger a save: @Environment(\.undoManager) var undoManager
Post not yet marked as solved
6 Replies
This seems to work, but I'm not sure how brittle it is: for window in UIApplication.shared.windows where window.isKeyWindow { 		window.rootViewController?.dismiss(animated: true, completion: nil) 		break }
Post not yet marked as solved
3 Replies
According to Developer Tech Support, the local documents folder only shows up if there is a document in it. It's easy to test: when you delete all the local docs, the folder disappears. Interestingly, the user can also move a doc to the local folder, causing it to show up again.Anyone know why it works this way? Super confusing.
Post marked as solved
2 Replies
I'm no expert, but I will try to answer.SwiftUI uses only source code to describe the UI. No storyboard files.SwiftUI is similar to other reactive UI frameworks, which are quite powerful.I think the intent here is to be able to use SwiftUI for all apps. It's pretty cool how you can adopt it piecemeal within your app. cheers