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
 

Videos

Abrir menú Cerrar menú
  • Colecciones
  • Todos los videos
  • Información

Más videos

  • Información
  • Código
  • Customize feature discovery with TipKit

    Focused on feature discovery, the TipKit framework makes it easy to display tips in your app. Now you can group tips so features are discovered in the ideal order, make tips reusable with custom tip identifiers, match the look and feel to your app, and sync tips using CloudKit. Learn how you can use the latest advances in TipKit to help people discover everything your app has to offer.

    Capítulos

    • 0:00 - Introduction
    • 1:18 - Tip groups
    • 5:12 - Reusable tips with custom identifiers
    • 8:25 - Custom tip styles
    • 10:48 - Sync tips with CloudKit

    Recursos

    • Forum: App & System Services
    • TipKit
      • Video HD
      • Video SD

    Videos relacionados

    WWDC23

    • Make features discoverable with TipKit
  • Buscar este video…
    • 1:43 - Create new tips

      // Create new tips
      
      struct ShowLocationTip: Tip {
          var title: Text {
              Text("Show your location")
          }
      
          var message: Text? {
              Text("Tap the compass to highlight your current location on the map.")
          }
      
          var image: Image? {
              Image(systemName: "location.circle")
          }
      }
    • 1:54 - Create new tips

      // Create new tips
      
      struct ShowLocationTip: Tip {
          var title: Text {
              Text("Show your location")
          }
      
          var message: Text? {
              Text("Tap the compass to highlight your current location on the map.")
          }
      
          var image: Image? {
              Image(systemName: "location.circle")
          }
      }
      
      struct RotateMapTip: Tip {
          var title: Text {
              Text("Reorient the map")
          }
      
          var message: Text? {
              Text("Tap and hold on the compass to rotate the map back to 0° North.")
          }
      
          var image: Image? {
              Image(systemName: "hand.tap")
          }
      }
    • 2:09 - Show popover tips

      // Show popover tips
      
      struct MapCompassControl: View {
          let showLocationTip = ShowLocationTip()
          let rotateMapTip = RotateMapTip()
      
          var body: some View {
              CompassDial()
                  .popoverTip(showLocationTip)
                  .popoverTip(rotateMapTip)
                  .onTapGesture {
                      showCurrentLocation()
                  }
                  .onLongPressGesture(minimumDuration: 0.1) {
                      reorientMapHeading()
                  }
          }
      }
    • 2:41 - Create a TipGroup

      // Create a TipGroup
      
      struct MapCompassControl: View {
          @State
          var compassTips: TipGroup(.ordered) {
              ShowLocationTip()
              RotateMapTip()
          }
      
          var body: some View {
              CompassDial()
                  .popoverTip(compassTips.currentTip)
                  .onTapGesture {
                      showCurrentLocation()
                  }
                  .onLongPressGesture(minimumDuration: 0.1) {
                      reorientMapHeading()
                  }
          }
      }
    • 3:15 - Show TipGroup tips on different views

      // Show TipGroup tips on different views
      
      struct MapControlsStack: View {
          @State
          var compassTips: TipGroup(.ordered) {
              ShowLocationTip()
              RotateMapTip()
          }
      
          var body: some View {
              VStack {
                  ShowLocationButton()
                      .popoverTip(compassTips.currentTip as? ShowLocationTip)
                  RotateMapButton()
                      .popoverTip(compassTips.currentTip as? RotateMapTip)
              }
          }
      }
    • 3:50 - Invalidate tips

      // Invalidate tips
      
      struct MapCompassControl: View {
          @State
          var compassTips: TipGroup(.ordered) {
              showLocationTip
              rotateMapTip
          }
      
          var body: some View {
              CompassDial()
                  .popoverTip(compassTips.currentTip)
                  .onTapGesture {
                      showLocationTip.invalidate(reason: .actionPerformed)
                      showCurrentLocation()
                  }
                  .onLongPressGesture(minimumDuration: 0.1) {
                      rotateMapTip.invalidate(reason: .actionPerformed)
                      reorientMapHeading()
                  }
          }
      }
    • 5:37 - Create a tip

      // Create a tip
      
      struct ButlerForkTip: Tip {
          var title: Text {
              Text("Butler Fork is now available")
          }
      
          var message: Text? {
              Text("To see key trail info, tap Big Cottonwood Canyon on the map.")
          }
        
          var actions: [Action] {
              Action(title: "Go there now")
          }
        
          var rules: [Rule] {
              #Rule(Region.bigCottonwoodCanyon.didVisitEvent) {
                  $0.donations.count > 3
              }
          }
      }
    • 6:01 - Show a TipView

      // Show a TipView
      
      struct ButlerForkTip: Tip {
          var title: Text {
              Text("Butler Fork is now available")
          }
      
          var message: Text? {
              Text("To see key trail info, tap Big Cottonwood Canyon on the map.")
          }
        
          var actions: [Action] {
              Action(title: "Go there now")
          }
        
          var rules: [Rule] {
              #Rule(Region.bigCottonwoodCanyon.didVisitEvent) {
                  $0.donations.count > 3
              }
          }
      }
      
      struct TrailList: View {
          var trails: [Trail]
      
          var body: some View {
              ScrollView {
                  let butlerForkTip = ButlerForkTip()
                  TipView(butlerForkTip) { _ in
                      highlightButlerForkTrail()
                  }
      
                  ListSection(title: "Trails", trails: trails)
              }
          }
      }
    • 6:45 - Create a reusable tip

      // Create a reusable tip
      
      struct NewTrailTip: Tip {
          let newTrail: Trail
      
          var title: Text {
              Text("\(newTrail.name) is now available")
          }
      
          var message: Text? {
              Text("To see key trail info, tap \(newTrail.region) on the map.")
          }
      
          var actions: [Action] {
              Action(title: "Go there now")
          }
        
          var id: String {
              "NewTrailTip-\(newTrail.id)"
          }
        
          var rules: [Rule] {
              #Rule(newTrail.region.didVisitEvent) {
                  $0.donations.count > 3
              }
          }
      }
    • 7:26 - Show a TipView

      // Show a TipView
      
      struct NewTrailTip: Tip {
          let newTrail: Trail
      
          var title: Text {
              Text("\(newTrail.name) is now available")
          }
      
          var message: Text? {
              Text("To see key trail info, tap \(newTrail.region) on the map.")
          }
      
          var actions: [Action] {
              Action(title: "Go there now")
          }
        
          var id: String {
              "NewTrailTip-\(newTrail.id)"
          }
        
          var rules: [Rule] {
              #Rule(newTrail.region.didVisitEvent) {
                  $0.donations.count > 3
              }
          }
      }
      
      struct TrailList: View {
          var trails: [Trail]
          let newTrail: Trail
      
          var body: some View {
              ScrollView {
                  let newTrailTip = NewTrailTip(newTrail: newTrail)
                  TipView(newTrailTip) { _ in
                      highlightTrail(newTrailTip)
                  }
      
                  ListSection(title: "Trails", trails: trails)
              }
          }
      }
    • 8:55 - Create a custom TipViewStyle

      // Create a custom TipViewStyle
      
      struct NewTrailTipViewStyle: TipViewStyle {
          func makeBody(configuration: Configuration) -> some View {
              let tip = configuration.tip as! NewTrailTip
      
              TrailImage(imageName: tip.newTrail.heroImage)
                  .frame(maxHeight: 150)
                  .overlay {
                      VStack {
                          configuration.title.font(.title)
                          configuration.message.font(.subheadline)
                      }
                  }
          }
      }
      
      extension NewTrailTipViewStyle {
          struct TrailImage: View {
              let imageName: String
      
              var body: some View {
                  Image(imageName)
                      .resizable()
                      .aspectRatio(contentMode: .fill)
              }
          }
      }
    • 9:20 - Apply a TipViewStyle

      // Apply a TipViewStyle
      
      struct NewTrailTipViewStyle: TipViewStyle {
          func makeBody(configuration: Configuration) -> some View {
              let tip = configuration.tip as! NewTrailTip
      
              TrailImage(imageName: tip.newTrail.heroImage)
                  .frame(maxHeight: 150)
                  .overlay {
                      VStack {
                          configuration.title.font(.title)
                          configuration.message.font(.subheadline)
                      }
                  }
          }
      }
      
      extension NewTrailTipViewStyle {
          struct TrailImage: View {
              let imageName: String
      
              var body: some View {
                  Image(imageName)
                      .resizable()
                      .aspectRatio(contentMode: .fill)
              }
          }
      }
      
      struct TrailList: View {
          var trails: [Trail]
          let newTrail: Trail
      
          var body: some View {
              ScrollView {
                  let newTrailTip = NewTrailTip(newTrail: newTrail)
                  TipView(newTrailTip) { _ in
                      highlightTrail(newTrailTip)
                  }
                  .tipViewStyle(NewTrailTipViewStyle())
      
                  ListSection(title: "Trails", trails: trails)
              }
          }
      }
    • 9:45 - Add the tip's action handler

      // Apply a TipViewStyle
      
      struct NewTrailTipViewStyle: TipViewStyle {
          func makeBody(configuration: Configuration) -> some View {
              let tip = configuration.tip as! NewTrailTip
              let highlightTrailAction = configuration.actions.first!
      
              TrailImage(imageName: tip.newTrail.heroImage)
                  .frame(maxHeight: 150)
                  .onTapGesture { highlightTrailAction.handler() }
                  .overlay {
                      VStack {
                          configuration.title.font(.title)
                          HStack {
                              configuration.message.font(.subheadline)
                              Spacer()
                              Image(systemName: "chevron.forward.circle")
                                  .foregroundStyle(.white)
                          }
                      }
                  }
          }
      }
      
      extension NewTrailTipViewStyle {
          struct TrailImage: View {
              let imageName: String
      
              var body: some View {
                  Image(imageName)
                      .resizable()
                      .aspectRatio(contentMode: .fill)
              }
          }
      }
      
      struct TrailList: View {
          var trails: [Trail]
          let newTrail: Trail
      
          var body: some View {
              ScrollView {
                  let newTrailTip = NewTrailTip(newTrail: newTrail)
                  TipView(newTrailTip) { _ in
                      highlightTrail(newTrailTip)
                  }
                  .tipViewStyle(NewTrailTipViewStyle())
      
                  ListSection(title: "Trails", trails: trails)
              }
          }
      }
    • 11:38 - Add CloudKit sync for tips

      // Add CloudKit sync for tips
      
      @main
      struct TipKitTrails: App {
          var body: some Scene {
              WindowGroup {
                  ContentView()
                      .task {
                          await configureTips()
                      }
              }
          }
      
          func configureTips() async {
              do {
                  try Tips.configure([
                      .cloudKitContainer(.named("iCloud.com.apple.TipKitTrails.tips")),
                      .displayFrequency(.weekly)
                  ])
              }
              catch {
                  print("Unable to configure tips: \(error)")
              }
          }
      }

Developer Footer

  • Videos
  • WWDC24
  • Customize feature discovery with TipKit
  • 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