View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Abrir menú Cerrar menú
  • Colecciones
  • Todos los videos
  • Información

Más videos

  • Información
  • Código
  • Build with iOS pickers, menus and actions

    Build iPhone and iPad apps with fluid interfaces and easily-accessible contextual information. We'll show you how to integrate the latest UIKit controls into your app to best take advantage of menus, date pickers, page controls, and segmented controllers. Learn how to adopt Menus throughly your user interface, and explore how UIAction can help unify your event handling.

    Once you've learned about these new controls, watch “Design with iOS pickers, menus and actions” to discover how to design great interfaces with these tools and APIs.

    Recursos

    • Adopting menus and UIActions in your user interface
      • Video HD
      • Video SD

    Videos relacionados

    WWDC20

    • Build for the iPadOS pointer
    • Design with iOS pickers, menus and actions
    • Meet the new Photos picker
    • Optimize the interface of your Mac Catalyst app
    • What's new in PencilKit
  • Buscar este video…
    • 4:34 - UIPageControl example

      let pageControl = UIPageControl()
      pageControl.numberOfPages = 5
      
      pageControl.backgroundStyle = .prominent
      
      pageControl.preferredIndicatorImage =
          UIImage(systemName: "bookmark.fill")
      
      pageControl.setIndicatorImage(
          UIImage(systemName: "heart.fill"), forPage: 0)
    • 6:56 - UIColorPickerViewController example

      var color = UIColor.blue
      var colorPicker = UIColorPickerViewController()
      
      func pickColor() {
          colorPicker.supportsAlpha = true
          colorPicker.selectedColor = color
          self.present(colorPicker,
              animated: true,
            completion: nil)
      }
      
      func colorPickerViewControllerDidSelectColor(_
        viewController: UIColorPickerViewController) {
          color = viewController.selectedColor
      }
      
      func colorPickerViewControllerDidFinish(_
        viewController: UIColorPickerViewController) {
          // Do nothing
      }
    • 10:04 - UIDatePicker example

      let datePicker = UIDatePicker()
      datePicker.date = Date(timeIntervalSinceReferenceDate:
                             timeInterval)
      
      datePicker.preferredDatePickerStyle = .compact
      
      datePicker.calendar = Calendar(identifier: .japanese)
      datePicker.datePickerMode = .date
      
      datePicker.addTarget(self,
                   action: #selector(dateSet),
                      for: .valueChanged)
    • 14:20 - UIDeferredMenuElement example

      button.menu = UIMenu(title: "", children: [
          UIMenu(title: "", options: .displayInline, children: (1...2).map { UIAction(title: "Static Item \($0)") { action in }}),
          UIDeferredMenuElement({ completion in
              DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
                  completion([UIMenu(title: "", options: .displayInline, children: (1...2).map { UIAction(title: "Dynamic Item \($0)") { action in }})])
              }
          }),
      ])
    • 14:50 - updateVisibleMenu example

      self.contextMenuInteraction.updateVisibleMenu { currentMenu -> UIMenu in
          currentMenu.children.forEach { element in
              guard let action = element as? UIAction else { return }
              
              action.state = Bool.random() ? .off : .on
              action.attributes = Bool.random() ? [.hidden] : []
          }
          return currentMenu
      }
    • 16:05 - UIBarButtonItem example

      let saveAction = UIAction(title: "") { action in }
      let saveMenu = UIMenu(title: "", children: [
          UIAction(title: "Copy", image: UIImage(systemName: "doc.on.doc")) { action in },
          UIAction(title: "Rename", image: UIImage(systemName: "pencil")) { action in },
          UIAction(title: "Duplicate", image: UIImage(systemName: "plus.square.on.square")) { action in },
          UIAction(title: "Move", image: UIImage(systemName: "folder")) { action in },
      ])
      let optionsImage = UIImage(systemName: "ellipsis.circle")
      let optionsMenu = UIMenu(title: "", children: [
          UIAction(title: "Info", image: UIImage(systemName: "info.circle")) { action in },
          UIAction(title: "Share", image: UIImage(systemName: "square.and.arrow.up")) { action in },
          UIAction(title: "Collaborate", image: UIImage(systemName: "person.crop.circle.badge.plus")) { action in },
      ])
      let revertAction = UIAction(title: "Revert") { action in }
      self.toolbarItems = [
          UIBarButtonItem(systemItem: .save, primaryAction: saveAction, menu: saveMenu),
          .fixedSpace(width:20.0),
          UIBarButtonItem(image: optionsImage, menu: optionsMenu),
          .flexibleSpace(),
          UIBarButtonItem(primaryAction: revertAction),
      ]

Developer Footer

  • Videos
  • WWDC20
  • Build with iOS pickers, menus and actions
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines