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
    • AI & Machine Learning
    • App Intents
    • Apple Intelligence
    • Games
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community 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
  • Résumé
  • Code
  • Prepare your app for iPhone Duo

    Learn how to update and optimize your app for the foldable display of iPhone Duo. Discover how to opt in to the full-screen experience, adopt flexible layout best practices, and simulate poses in Device Hub with Xcode. Find out how to use size classes instead of interface orientation, handle asymmetric safe areas, and test Split View multitasking to ensure your app shines in all the ways people use it.

    Chapitres

    • 0:00 - Introduction
    • 0:30 - Build with the latest SDK
    • 1:17 - Get started in Xcode
    • 1:33 - Adopt flexible layouts
    • 2:46 - Use size classes
    • 3:57 - Avoid screen assumptions
    • 5:01 - Adopt standard navigation
    • 6:06 - Respect safe areas
    • 8:08 - Use reserved regions
    • 9:12 - Next steps

    Ressources

      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    Tech Talks

    • Leverage multiple displays and scenes on iPhone Duo
    • Raise the bar with iPhone Duo
    • Strike a pose with adaptive layouts on iPhone Duo

    WWDC26

    • Modernisez votre app UIKit
  • Rechercher dans cette vidéo…
    • 2:59 - Read size classes

      // SwiftUI
      @Environment(\.horizontalSizeClass)
      private var horizontalSizeClass
      
      @Environment(\.verticalSizeClass)
      private var verticalSizeClass
      
      // UIKit
      traitCollection.horizontalSizeClass
      traitCollection.verticalSizeClass
    • 4:16 - Access the screen from the window scene

      // Avoid referencing the main screen on a two-display device.
      // Access the screen dynamically from the window scene instead.
      let screen = window?.windowScene?.screen
    • 4:30 - Match the screen corners with Concentricity

      // SwiftUI
      ConcentricRectangle()
          .fill(Color.green)
          .padding(8.0)
          .ignoresSafeArea()
      
      // UIKit
      // UICornerConfiguration
    • 5:44 - Show a sidebar on the inner display

      // SwiftUI
      TabView { … }
          .defaultTabBarPlacement(.sidebar)
      
      // UIKit
      tabBarController.sidebar.preferredPlacement = .sidebar
    • 6:52 - Align foreground content to the safe area

      // UIKit
      foreground.frame = view.bounds.inset(by: view.safeAreaInsets)
    • 7:07 - Let background content extend past the safe area

      // SwiftUI
      .ignoresSafeArea()
      
      // UIKit
      backgroundView.frame = view.bounds
    • 7:30 - Handle asymmetric safe area insets

      // Avoid assuming insets on opposite sides are equal
      let width = view.bounds.width - view.safeAreaInsets.left * 2
      
      // Handle each side independently
      let width = view.bounds.inset(by: view.safeAreaInsets).width
    • 9:25 - Replace main screen references

      func updateThumbnail(from image: UIImage) {
          // Before
          let screenScale = UIScreen.main.scale
      
          // After
          let screenScale = traitCollection.displayScale
          // ...
      }
    • 0:00 - Introduction
    • David Jackson from the UI Frameworks team outlines how to bring your app to iPhone Duo: getting started in Xcode, general resizing guidance, and layout guidance specific to iPhone Duo.

    • 0:30 - Build with the latest SDK
    • Your app runs on iPhone Duo even without recompiling, but screen usage improves with each SDK. The iOS 27 SDK extends your app left of the status bar on the inner display; the iOS 27.1 SDK reaches the screen edge and lays standard navigation and toolbar buttons out vertically.

    • 1:17 - Get started in Xcode
    • Download Xcode 27.1 and run your app in the iPhone Duo simulator using DeviceHub. On-screen control buttons let you open, close, rotate, and fold the device to check your layout in every pose.

    • 1:33 - Adopt flexible layouts
    • iPhone Duo extends the long-standing need for adaptive layout — new screen shapes, camera locations, and iPhone mirroring on the Mac. Avoid assumptions about display size or capability based on user interface idiom, and design across a continuum of sizes.

    • 2:46 - Use size classes
    • Size classes express the experience your app should provide for the available space — the environment in SwiftUI, trait collection in UIKit. The outer display behaves like other iPhone models, while the inner display is regular in both dimensions, leaving room for sidebars. The inner display doesn't honor supported interface orientations, so use size classes rather than orientation for layout decisions.

    • 3:57 - Avoid screen assumptions
    • Don't reference the main screen on a two-display device — it's ambiguous and will be deprecated. Prefer the environment, trait collection, or the scene's bounds, and access screens dynamically from the window scene. Use the iOS 26 Concentricity APIs, ConcentricRectangle and UICornerConfiguration, to fit the screen's corners.

    • 5:01 - Adopt standard navigation
    • NavigationSplitView, UISplitViewController, TabView, and UITabBarController are fully adaptive across every pose — columns collapse when closed and tile or overlay when open. On the inner display you can opt into a sidebar placement for richer navigation. Sheets, popovers, context menus, and alerts adapt as well.

    • 6:06 - Respect safe areas
    • Standard bars lay out outside the safe area and automatically avoid the status bar and camera. Keep interactive foreground content inside the safe area, and let background artwork extend past it with ignoresSafeArea or the view's bounds. Safe areas and layout margins are often asymmetric on iPhone Duo, so handle each side independently and test in Split View.

    • 8:08 - Use reserved regions
    • New in iOS 27.1, ReservedRegion in SwiftUI and UIViewReservedRegion in UIKit let custom UI claim as much screen space as possible without colliding with system UI — useful for custom bars and edge-to-edge designs.

    • 9:12 - Next steps
    • The app modernization skill introduced in "Modernize your UIKit app" is now called App Resizability in Xcode 27.1, with support for SwiftUI and iPhone Duo. Download Xcode 27.1, simulate with DeviceHub, follow the adaptive layout practices, and try the skill.

Developer Footer

  • Vidéos
  • Tech Talks
  • Prepare your app for iPhone Duo
  • 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
    • AI & Machine Learning
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    • Documentation Archive
    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.
    Follow us on bilibili, LinkedIn, WeChat, and YouTube.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines