how do I add a new ui controller
Asked on 07/30/2024
1 search
To add a new UI controller, you can follow the guidance provided in the session "Evolve your document launch experience" from WWDC 2024. Here are the steps you need to take:
- Subclass a View Controller: Create a subclass of a view controller that will handle the new UI.
- Assign Launch Options: Assign the launch options primary or secondary action to be a create document action with the intent to handle requests for new documents.
- Set the Delegate: Assign the delegate of the launch options browser view controller.
- Read the Intent: Read the browser's active document creation intent to determine which document to create.
For UIKit apps, you should make UIDocumentViewController
the root view controller and apply your customizations to the launch options. This will help you emphasize your app's uniqueness and make it recognizable on first sight.
For a detailed overview, you can refer to the session Evolve your document launch experience at the 03:18 mark.
Relevant Sessions
- Evolve your document launch experience
- Explore game input in visionOS
- What’s new in AppKit
- Explore multiview video playback in visionOS
If you need more specific details or code examples, please let me know!

What’s new in AppKit
Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.

Evolve your document launch experience
Make your document-based app stand out, and bring its unique identity into focus with the new document launch experience. Learn how to leverage the new API to customize the first screen people see when they launch your app. Utilize the new system-provided design, and amend it with custom actions, delightful decorative views, and impressive animations.

Explore multiview video playback in visionOS
Learn how AVExperienceController can enable playback of multiple videos on Apple Vision Pro. Review best practices for adoption and explore great use cases, like viewing a sports broadcast from different angles or watching multiple games simultaneously. And discover how to design a compelling and intuitive multiview experience in your app.