how to create apps on toolbar macos

Generated on 9/7/2024

1 search

To create apps with toolbars on macOS, you can utilize the enhancements to NSToolbar as discussed in the session titled "What’s new in AppKit" at WWDC 2024. Here are some key points to consider:

  1. Display Modes: NSToolbar now supports displaying items with and without text labels. This allows you to offer users a choice of style, even if the toolbar contents aren't customizable. You can enable this feature using the allowsDisplayModeCustomization property, which is enabled by default. Ensure your toolbar has an identifier so that AppKit can save the style preference.

  2. Item Identifiers: You can use the new itemIdentifiers property to set a toolbar's item identifiers automatically, which provides a convenience over the existing items property.

  3. SwiftUI Integration: You can incrementally adopt SwiftUI with new menu and animation APIs, which can be integrated into your toolbar design.

For more detailed guidance, you can refer to the session What’s new in AppKit (15:21) where toolbar refinements are discussed.

What’s new in AppKit

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.

Bring your app’s core features to users with App Intents

Bring your app’s core features to users with App Intents

Learn the principles of the App Intents framework, like intents, entities, and queries, and how you can harness them to expose your app’s most important functionality right where people need it most. Find out how to build deep integration between your app and the many system features built on top of App Intents, including Siri, controls and widgets, Apple Pencil, Shortcuts, the Action button, and more. Get tips on how to build your App Intents integrations efficiently to create the best experiences in every surface while still sharing code and core functionality.

What’s new in SwiftUI

What’s new in SwiftUI

Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

Tailor macOS windows with SwiftUI

Tailor macOS windows with SwiftUI

Make your windows feel tailor-made for macOS. Fine-tune your app’s windows for focused purposes, ease of use, and to express functionality. Use SwiftUI to style window toolbars and backgrounds. Arrange your windows with precision, and make smart decisions about restoration and minimization.

Dive deep into volumes and immersive spaces

Dive deep into volumes and immersive spaces

Discover powerful new ways to customize volumes and immersive spaces in visionOS. Learn to fine-tune how volumes resize and respond to people moving around them. Make volumes and immersive spaces interact through the power of coordinate conversions. Find out how to make your app react when people adjust immersion with the Digital Crown, and use a surrounding effect to dynamically customize the passthrough tint in your immersive space experience.

What’s new in privacy

What’s new in privacy

At Apple, we believe privacy is a fundamental human right. Learn about new and improved permission flows and other features that manage data in a privacy-preserving way, so that you can focus on creating great app experiences.

Support semantic search with Core Spotlight

Support semantic search with Core Spotlight

Learn how to provide semantic search results in your app using Core Spotlight. Understand how to make your app’s content available in the user’s private, on-device index so people can search for items using natural language. We’ll also share how to optimize your app’s performance by scheduling indexing activities. To get the most out of this session, we recommend first checking out Core Spotlight documentation on the Apple Developer website.