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
 

Vidéos

Ouvrir le menu Fermer le menu
  • Collections
  • Toutes les vidéos
  • À propos

Plus de vidéos

  • À propos
  • Code
  • VoiceOver efficiency with custom rotors

    Discover how you can integrate custom rotors and help people who use VoiceOver navigate complex situations within your app. Learn how custom rotors can help people explore even the most intricate interfaces, explore how to implement a custom rotor, and find out how rotors can improve navigation for someone who relies on VoiceOver.

    To get the most out of this session, you should be familiar with general accessibility principles and VoiceOver accessibility APIs on iOS and iPadOS. For an overview, watch “Making Apps More Accessible with Custom Actions.”

    Ressources

    • Accessibility for UIKit
      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC23

    • Create accessible spatial experiences

    WWDC21

    • SwiftUI Accessibility: Beyond the basics

    WWDC19

    • Making Apps More Accessible With Custom Actions
  • Rechercher dans cette vidéo…
    • 4:04 - mapView.accessibilityCustomRotors = [customRotor(for: .stores), customRotor(for: .parks)]

      mapView.accessibilityCustomRotors = [customRotor(for: .stores), customRotor(for: .parks)]
    • 4:31 - map rotor 1

      // Custom map rotors
      
      func customRotor(for poiType: POI) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: poiType.rotorName) { [unowned self] predicate in
      
              return UIAccessibilityCustomRotorItemResult(    )
          }
      }
    • 4:56 - map rotor 2

      // Custom map rotors
      
      func customRotor(for poiType: POI) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: poiType.rotorName) { [unowned self] predicate in
              let currentElement = predicate.currentItem.targetElement as? MKAnnotationView
              let annotations = self.annotationViews(for: poiType)
              let currentIndex = annotations.firstIndex { $0 == currentElement }
              return UIAccessibilityCustomRotorItemResult(    )
      
          }
      }
    • 5:04 - map rotor 3

      // Custom map rotors
      
      func customRotor(for poiType: POI) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: poiType.rotorName) { [unowned self] predicate in
              let currentElement = predicate.currentItem.targetElement as? MKAnnotationView
              let annotations = self.annotationViews(for: poiType)
              let currentIndex = annotations.firstIndex { $0 == currentElement }
              let targetIndex: Int
              switch predicate.searchDirection {
              case .previous:
                  targetIndex = (currentIndex ?? 1) - 1
              case .next:
                  targetIndex = (currentIndex ?? -1) + 1
              }
              return UIAccessibilityCustomRotorItemResult(    )
      
          }
      }
    • 5:17 - Maps rotor 4

      // Custom map rotors
      
      func customRotor(for poiType: POI) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: poiType.rotorName) { [unowned self] predicate in
              let currentElement = predicate.currentItem.targetElement as? MKAnnotationView
              let annotations = self.annotationViews(for: poiType)
              let currentIndex = annotations.firstIndex { $0 == currentElement }
              let targetIndex: Int
              switch predicate.searchDirection {
              case .previous:
                  targetIndex = (currentIndex ?? 1) - 1
              case .next:
                  targetIndex = (currentIndex ?? -1) + 1
              }
              guard 0..<annotations.count ~= targetIndex else { return nil } // Reached boundary
              return UIAccessibilityCustomRotorItemResult(targetElement: annotations[targetIndex],
                                                          targetRange: nil)
          }
      }
    • 8:07 - Text rotor 1

      // Custom text rotor
      
      func customRotor(for attribute: NSAttributedString.Key) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: attribute.rotorName) { [unowned self] predicate in
              var targetRange: UITextRange? // Goal: find the range of following `attribute`
              let beginningRange = 
              guard let currentRange =    else { return nil }
      
              switch predicate.searchDirection {   }
      
              return UIAccessibilityCustomRotorItemResult(targetElement: self,
                                                          targetRange: targetRange)
          }
      }
    • 8:20 - Text rotor 2

      // Custom text rotor
      
      func customRotor(for attribute: NSAttributedString.Key) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: attribute.rotorName) { [unowned self] predicate in
              var targetRange: UITextRange? // Goal: find the range of following `attribute`
              let beginningRange = self.textRange(from: self.beginningOfDocument,
                                                  to: self.beginningOfDocument)
              guard let currentRange = predicate.currentItem.targetRange ?? beginningRange else {
                  return nil
              }
              let searchRange: NSRange, searchOptions: NSAttributedString.EnumerationOptions
              switch predicate.searchDirection {   }
      
              return UIAccessibilityCustomRotorItemResult(targetElement: self,
                                                          targetRange: targetRange)
          }
      }
    • 8:37 - Text rotor 3

      // Custom text rotor
      
      func customRotor(for attribute: NSAttributedString.Key) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: attribute.rotorName) { [unowned self] predicate in
              var targetRange: UITextRange? // Goal: find the range of following `attribute`
              let beginningRange = 
              guard let currentRange =    else { return nil }
              let searchRange: NSRange, searchOptions: NSAttributedString.EnumerationOptions
              switch predicate.searchDirection {
              case .previous:
                  searchRange = self.rangeOfAttributedTextBefore(currentRange)
                  searchOptions = [.reverse]
              case .next:
                  searchRange = self.rangeOfAttributedTextAfter(currentRange)
                  searchOptions = []
              }
             
              return UIAccessibilityCustomRotorItemResult(targetElement: self,
                                                          targetRange: targetRange)
          }
      }
    • 9:06 - Text rotor 4 (end)

      // Custom text rotor
      
      func customRotor(for attribute: NSAttributedString.Key) -> UIAccessibilityCustomRotor {
          UIAccessibilityCustomRotor(name: attribute.rotorName) { [unowned self] predicate in
              var targetRange: UITextRange? // Goal: find the range of following `attribute`
              let beginningRange =
              guard let currentRange =    else { return nil }
              let searchRange: NSRange, searchOptions: NSAttributedString.EnumerationOptions
              switch predicate.searchDirection {   }
              self.attributedText.enumerateAttribute(
                  attribute, in: searchRange, options: searchOptions) { value, range, stop in
                  guard value != nil else { return }
                  targetRange = self.textRange(from: range)
                  stop.pointee = true
              }
              return UIAccessibilityCustomRotorItemResult(targetElement: self,
                                                          targetRange: targetRange)
          }
      }

Developer Footer

  • Vidéos
  • WWDC20
  • VoiceOver efficiency with custom rotors
  • 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