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
  • 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.

    Capítulos

    • 0:00 - Introduction
    • 3:54 - Lockups
    • 5:12 - Shelves
    • 7:35 - Catalogs
    • 11:07 - Search

    Recursos

    • Forum: UI Frameworks
    • Creating a tvOS media catalog app in SwiftUI
      • Vídeo HD
      • Vídeo SD

    Vídeos relacionados

    WWDC24

    • Demystify SwiftUI containers
    • What’s new in SwiftUI
    • What’s new in UIKit
  • Buscar neste vídeo...
    • 4:18 - Borderless button lockup

      Button {} label: {
          Image("discovery_landscape")
              .resizable()
              .frame(width: 250, height: 375)
          Text("Borderless Portrait")
      }
      .buttonStyle(.borderless)
    • 5:38 - Standard content shelf

      ScrollView(.horizontal) {
          LazyHStack(spacing: 40) {
              ForEach(Asset.allCases) { asset in
                  Button {} label: {
                      asset.portraitImage
                          .resizable()
                          .aspectRatio(250/375, contentMode: .fit)
                          .containerRelativeFrame(.horizontal, count: 6, spacing: 40)
                      Text(asset.title)
                  }
              }
          }
      }
      .scrollClipDisabled()
      .buttonStyle(.borderless)
    • 8:19 - Card button

      ScrollView(.horizontal) {
          LazyHStack(spacing: 48) {
              ForEach(Asset.allCases) { asset in
                  Button {} label: {
                      HStack(alignment: .top, spacing: 10) {
                          asset.landscapeImage
                              .resizable()
                              .aspectRatio(contentMode: .fit)
                              .clipShape(RoundedRectangle(cornerRadius: 12))
      
                          VStack(alignment: .leading) {
                              Text(asset.title)
                                  .font(.body)
                              Text("Subtitle text goes here, limited to two lines")
                                  .font(.caption2)
                                  .foregroundStyle(.secondary)
                                  .lineLimit(2)
                              Spacer(minLength: 0)
                              HStack(spacing: 4) {
                                  ForEach(1..<4) { _ in
                                      Image(systemName: "ellipsis.rectangle.fill")
                                  }
                              }
                              .foregroundStyle(.secondary)
                          }
                      }
                      .padding([.leading, .top, .bottom], 12)
                      .padding(.trailing, 20)
                      .frame(maxWidth: .infinity)
                  }
                  .containerRelativeFrame(.horizontal, count: 3, spacing: 48)
              }
          }
      }
      .scrollClipDisabled()
      .buttonStyle(.card)
    • 8:39 - Landing page

      ScrollView(.vertical) {
          LazyVStack(alignment: .leading, spacing: 26) {
              VStack(alignment: .leading) {
                  Text("tvOS with SwiftUI")
                      .font(.largeTitle).bold()
      
                  Spacer(minLength: 300)
      
                  HStack {
                      Button("Show") {}
                      Button(“More Info…”) {}
                      Spacer()
                  }
                  .padding(.bottom, 100)
      
                  Spacer()
              }
              .onScrollVisibilityChange { visible in
                  withAnimation {
                      belowFold = !visible
                  }
              }
      
              Section("Movie Shelf") {
                  MovieShelf()
              }
      
              Section("TV and Music Shelf") {
                  TVMusicShelf()
              }
      
              Section("Content Cards") {
                  CardShelf()
              }
          }
          .scrollTargetLayout()
      }
      .scrollClipDisabled()
      .background(alignment: .top) {
          if !belowFold {
              Image("beach_landscape")
                  .resizable()
                  .aspectRatio(contentMode: .fill)
                  .ignoresSafeArea()
                  .mask {
                      LinearGradient(stops: [
                          .init(color: .black, location: 0.0),
                          .init(color: .black, location: 0.45),
                          .init(color: .black.opacity(0), location: 0.8)
                      ], startPoint: .top, endPoint: .bottom)
                  }
          }
      }
      .scrollTargetBehavior(.viewAligned)
    • 11:13 - Tab view

      TabView {
          Tab("Stack", systemImage: "line.3.horizontal") {
              StackView()
          }
      
          // Other Tabs...
      
          Tab("Search", systemImage: "magnifyingglass") {
              SearchView()
          }
      }
    • 11:50 - Search page

      @State var searchTerm: String = ""
      
      let columns: [GridItem] = Array(repeating: .init(.flexible(), spacing: 40), count: 4)
      
      ScrollView(.vertical) {
          LazyVGrid(columns: columns) {
              ForEach(sortedMatchingAssets) { asset in
                  Button {} label: {
                      asset.landscapeImage
                          .resizable()
                          .aspectRatio(16 / 9, contentMode: .fit)
                      Text(asset.title)
                  }
              }
          }
      }
      .scrollClipDisabled()
      .buttonStyle(.borderless)
      .searchable(text: $searchTerm)
      .searchSuggestions {
          ForEach(suggestedSearchTerms, id: \.self) { suggestion in
              Text(suggestion)
          }
      }
    • 14:59 - Sidebar adaptable tab view style

      TabView {
          Tab("Stack", systemImage: "line.3.horizontal") {
              StackView()
          }
      
          // Other Tabs...
      
          Tab("Search", systemImage: "magnifyingglass") {
              SearchView()
          }
      }
      .tabViewStyle(.sidebarAdaptable)

Developer Footer

  • Vídeos
  • WWDC24
  • Migrate your TVML app to SwiftUI
  • 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