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
  • Update your app for watchOS 10

    Join us as we update an Apple Watch app to take advantage of the latest features in watchOS 10. In this code-along, we'll show you how to use the latest SwiftUI APIs to maximize glanceability and reorient app navigation around the Digital Crown.

    Chapitres

    • 1:33 - Build against the watchOS 10 SDK
    • 2:33 - NavigationSplitView
    • 5:21 - TabView and vertical pagination
    • 8:11 - Toolbar with new placement options
    • 9:07 - Background color
    • 11:10 - Materials

    Ressources

    • Updating your app and widgets for watchOS 10
    • Human Interface Guidelines: watchOS
      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC23

    • Design and build apps for watchOS 10
    • Meet watchOS 10
  • Rechercher dans cette vidéo…
    • 4:02 - NavigationSplitView

      NavigationSplitView {
          List(backyardsData.backyards, selection: $selectedBackyard) { backyard in
              BackyardCell(backyard: backyard)
          }
          .listStyle(.carousel)
      } detail: {
          if let selectedBackyard {
              BackyardView(backyard: selectedBackyard)
          } else {
              BackyardUnavailableView()
          }
      }
    • 6:18 - Vertical TabView

      TabView {
          TodayView()
              .navigationTitle("Today")
          HabitatGaugeView(level: $waterLevel, habitatType: .water, tintColor: .blue)
              .navigationTitle("Water")
          HabitatGaugeView(level: $foodLevel, habitatType: .food, tintColor: .green)
              .navigationTitle("Food")
          List {
              VisitorView()
                  .navigationTitle("Visitors")
          }
      }
      .tabViewStyle(.verticalPage)
    • 8:37 - Add refill button to Toolbar

      .toolbar {
          ToolbarItemGroup(placement: .bottomBar) {
              Spacer()
              Button {
                  level = Int(min(100, Double(level) + 5))
              } label: {
                  Label("Add", systemImage: "plus")
              }
          }
      }
    • 9:48 - HabitatGaugeView background color function and variables

      func backgroundColor(_ level: Int, for type: HabitatType) -> Color {
          let color: Color = type == .food ? .green : .blue
          return level < 40 ? .red : color
      }
      
      var waterColor: Color {
          backgroundColor(waterLevel, for: .water)
      }
      
      var foodColor: Color {
          backgroundColor(foodLevel, for: .food)
      }
    • 10:10 - .containerBackground within TabView

      TabView {
          TodayView()
              .navigationTitle("Today")
              .containerBackground(Color.accentColor.gradient, for: .tabView)
          HabitatGaugeView(level: $waterLevel, habitatType: .water, tintColor: waterColor)
              .navigationTitle("Water")
              .containerBackground(waterColor.gradient, for: .tabView)
          HabitatGaugeView(level: $foodLevel, habitatType: .food, tintColor: foodColor)
              .navigationTitle("Food")
              .containerBackground(foodColor.gradient, for: .tabView)
          List {
              VisitorView()
                  .navigationTitle("Visitors")
                  .containerBackground(Color.accentColor.gradient, for: .tabView)
          }
      }
      .tabViewStyle(.verticalPage)
      .environmentObject(backyard)
      .navigationTitle(backyard.displayName)
    • 11:38 - Add material to the backyard name

      .foregroundStyle(.secondary)
      .background(Material.ultraThin, in: RoundedRectangle(cornerRadius: 7))
    • 12:15 - Visitor score overlay with materials

      .overlay(alignment: .topTrailing) {
          Text("\(backyard.visitorScore)")
              .frame(width: 25, height: 25)
              .foregroundStyle(.secondary)
              .background(.ultraThinMaterial, in: .circle)
              .padding(.top, 5)
      }
    • 12:20 - Light materials

      .environment(\.colorScheme, .light)

Developer Footer

  • Vidéos
  • WWDC23
  • Update your app for watchOS 10
  • 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