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
 

Vídeos

Abrir menu Fechar menu
  • Coleções
  • Todos os vídeos
  • Sobre

Mais vídeos

  • Sobre
  • Código
  • Build for iPad

    Learn how to improve iPad apps to leverage the increased screen size and additional features of iPadOS, and help people accomplish more with their devices. Discover how you can build detailed multi-column layouts and integrate lists into your app with little adjustment to your existing code. We'll also explore reducing modality within your views to make it easier to navigate your interface with fewer taps and touches.

    To get the most out of this session, you should have a general understanding of iPad app layouts and UIKit. For more information, watch “Making Apps Adaptive, Part 1.” And while not necessary, familiarity with UICollectionView may also be helpful. Watch “Advances in Collection View Layout” for an overview.

    Want to learn more about list creation for your apps? Watch “Lists in UICollectionView”.

    Recursos

    • Human Interface Guidelines: Sidebars
    • Human Interface Guidelines: Split views
    • UISplitViewController
      • Vídeo HD
      • Vídeo SD

    Vídeos relacionados

    WWDC20

    • Advances in UICollectionView
    • Lists in UICollectionView
    • Modern cell configuration

    WWDC19

    • Advances in Collection View Layout
    • Advances in UI Data Sources
  • Buscar neste vídeo...
    • 1:57 - Create two column UISplitViewController

      let splitViewController = UISplitViewController(style: .doubleColumn)
    • 2:13 - Set view controllers for primary and secondary columns

      splitViewController.setViewController(sidebarViewController, for: .primary)
      splitViewController.setViewController(myHomeViewController, for: .secondary)
    • 2:28 - Create three column UISplitViewController

      let splitViewController = UISplitViewController(style: .tripleColumn)
    • 2:29 - Set view controller for supplementary column

      splitViewController.setViewController(inboxViewController, for: .supplementary)
    • 4:02 - Set view controller for compact column

      splitViewController.setViewController(tabBarController, for: .compact)
    • 5:29 - Set preferredSplitBehavior to .tile

      splitViewController.preferredSplitBehavior = .tile
    • 5:44 - Set preferredSplitBehavior to .displace

      splitViewController.preferredSplitBehavior = .displace
    • 5:51 - Set preferredSplitBehavior to .overlay

      splitViewController.preferredSplitBehavior = .overlay
    • 5:56 - Hide and show columns

      splitViewController.hideColumn(.primary)
      
      splitViewController.showColumn(.supplementary)
    • 6:08 - Set preferredDisplayMode

      splitViewController.preferredDisplayMode = .oneBesideSecondary
    • 8:06 - Collection view setup for sidebar list

      let configuration = UICollectionLayoutListConfiguration(appearance: .sidebar)
      let layout = UICollectionViewCompositionalLayout.list(using: configuration)
      let collectionView = UICollectionView(frame: frame, collectionViewLayout: layout)
    • 8:38 - Define a type for an example data structure

      struct MyItem: Hashable {
          let title: String
          let image: UIImage
      }
    • 9:36 - Create cell registration

      let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, MyItem> 
      { cell, indexPath, item in
      
          var content = cell.defaultContentConfiguration()
      
          content.text = item.title
          content.image = item.image
      
          cell.contentConfiguration = content
      }
    • 10:31 - Create diffable data source

      let dataSource = UICollectionViewDiffableDataSource<Section, MyItem>
         (collectionView: collectionView)
      { collectionView, indexPath, item in
         return collectionView.dequeueConfiguredReusableCell(using: cellRegistration, 
                                                             for: indexPath,
                                                             item: item)
      }
    • 11:29 - Collection view setup for sidebar plain list

      let configuration = UICollectionLayoutListConfiguration(appearance: .sidebarPlain)
      let layout = UICollectionViewCompositionalLayout.list(using: configuration)
      let collectionView = UICollectionView(frame: frame, collectionViewLayout: layout)
    • 15:35 - Example: Initializing UISplitViewController

      let splitViewController = UISplitViewController(style: .doubleColumn)
      
      // Primary column
      
      let sidebar = SidebarViewController()
      splitViewController.setViewController(sidebar, for: .primary)
      
      
      // Secondary column
      
      func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
          splitViewController.showDetailViewController(DetailViewController(), sender: self)
      }
    • 17:50 - Example: Setting a view controller for compact width

      let tabBarController = createTabBarController()
      
      splitViewController.setViewController(tabBarController, for: .compact)
    • 20:39 - Example: Sidebar Collection View setup

      let layout = UICollectionViewCompositionalLayout(sectionProvider: sectionProvider,
               configuration: UICollectionViewCompositionalLayoutConfiguration())
      
      func sectionProvider(_ section: Int, environment: NSCollectionLayoutEnvironment)
      -> NSCollectionLayoutSection {
          var configuration = UICollectionLayoutListConfiguration(appearance: .sidebar)
      
          if (environment.traitCollection.horizontalSizeClass == .compact) {
              configuration.headerMode = .firstItemInSection
          } else {
              configuration.headerMode = .none
          }
      
          return NSCollectionLayoutSection.list(using: configuration, layoutEnvironment: environment)
      }
    • 21:13 - Example: Cell Registration

      struct Section: Hashable { … }
      
      struct Item: Hashable { … }
      
      
      let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, Item> { cell, indexPath, item in
          // Configure the cell
      }
      
      
      let dataSource = UICollectionViewDiffableDataSource<Section, Item>(collectionView: collectionView) { collectionView, indexPath, item in
          return collectionView.dequeueConfiguredReusableCell(using: cellRegistration, for: indexPath, item: item)
      }
    • 21:48 - Example: Cell registration

      let cellRegistration = UICollectionView.CellRegistration<UICollectionViewListCell, Item> { cell, indexPath, item in
      
          var content = cell.defaultContentConfiguration()
      
          content.text = item.title
          content.image = item.image
      
          cell.contentConfiguration = content
      }

Developer Footer

  • Vídeos
  • WWDC20
  • Build for iPad
  • 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