SwiftUI Picker

Generated on 7/31/2024

1 search

SwiftUI Picker

SwiftUI provides a variety of pickers that can be used to select values from a list. Here are some relevant details from the WWDC 2024 sessions:

  1. Subscription Picker API:

    • The subscription picker expects two closures. The first closure returns the view representing each subscription option, and the second closure provides a view for subscribing to the selected plan.
    • You can create custom SwiftUI views for the picker options and use the new subscribe button API.
    • For more details, you can refer to the session What’s new in StoreKit and In-App Purchase.
  2. General Picker Usage:

    • Pickers are used to select one value from a list and can be customized extensively.
    • SwiftUI's declarative and adaptive views, including pickers, pack a lot of functionality in just a few lines of code.
    • For a broader overview of SwiftUI controls, including pickers, you can check out the session SwiftUI essentials.
  3. Transaction Picker in FinanceKit:

    • The transaction picker API is similar to the photo picker API and is used for selecting financial transactions.
    • It is straightforward to present and use, making it ideal for apps that need selective access to financial data.
    • For more information, see the session Meet FinanceKit.

Relevant Sessions

  1. What’s new in StoreKit and In-App Purchase
  2. SwiftUI essentials
  3. Meet FinanceKit

These sessions provide comprehensive insights into the new picker APIs and their usage in SwiftUI.

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.

SwiftUI essentials

SwiftUI essentials

Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.

What’s new in StoreKit and In-App Purchase

What’s new in StoreKit and In-App Purchase

Learn how to build and deliver even better purchase experiences using the App Store In-App Purchase system. We’ll demo new StoreKit views control styles and new APIs to improve your subscription customization, discuss new fields for transaction-level information, and explore new testability in Xcode. We’ll also review an important StoreKit deprecation.

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.

Meet FinanceKit

Meet FinanceKit

Learn how FinanceKit lets your financial management apps seamlessly and securely share on-device data from Apple Cash, Apple Card, and more, with user consent and control. Find out how to request one-time and ongoing access to accounts, transactions, and balances — and how to build great experiences for iOS and iPadOS.

Migrate your TVML app to SwiftUI

Migrate your TVML app to SwiftUI

SwiftUI helps you build great apps on all Apple platforms and is the preferred toolkit for bringing your content into the living room with tvOS 18. Learn how to use SwiftUI to create familiar layouts and controls from TVMLKit, and get tips and best practices.

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.

Meet the Contact Access Button

Meet the Contact Access Button

Learn about the new Contacts authorization modes and how to improve Contacts access in your app. Discover how to integrate the Contact Access Button into your app to share additional contacts on demand and provide an easier path to Contacts authorization. We’ll also cover Contacts security features and an alternative API to be used if the button isn’t appropriate for your app.