admaDIC App Development & IT Solutions

TipKit

by Annett Schwarze | 2025-11-06

Apple provides a TipKit framework which allows developers to embed contextual tips and onboarding hints directly within an app.

Tips can be shown as embedded views or popovers. When organizing in a TipGroup they can be shown sequentially.

        
import SwiftUI
import TipKit

@available(iOS 18.0, *)
struct SampleTipKitView: View {

    struct FirstTip: Tip {
        let id = "tip.first"
        var title: Text { Text("Tips can be embedded") }
        var message: Text? { Text("Tips can be embedded in a view") }
        var image: Image? { Image(systemName: "circle.square") }
    }

    struct SecondTip: Tip {
        let id = "tip.second"
        var title: Text { Text("Tips can be popups") }
        var message: Text? { Text("Tips can be shown as popups") }
        var image: Image? { Image(systemName: "text.bubble") }
    }

    struct ResetTip: Tip {
        let id = "tip.reset"
        var title: Text { Text("Reset Tips") }
        var message: Text? { Text("You can reset the tips") }
        var image: Image? { Image(systemName: "arrow.counterclockwise") }
    }

    private let firstTip = FirstTip()
    @State private var tips: TipGroup = TipGroup(.ordered) {
        SecondTip()
        ResetTip()
    }

    var body: some View {
        VStack(spacing: 16) {
            Text("TipKit Examples")
                .font(.largeTitle)

            Spacer()

            Text("Tips are provided by TipKit")

            TipView(firstTip)

            Spacer()
                .frame(height: 200)

            Text("They can be shown as popups")
                .popoverTip(tips.currentTip)

            Text("Tips can be reset using Tips.resetDatastore()")
                .popoverTip(tips.currentTip)

            Spacer()
            Spacer()
        }
        .padding()
        .font(.title3)
        .task {
            try? Tips.resetDatastore()
            try? Tips.configure()
        }
    }
}

@available(iOS 18.0, *)
#Preview {
    SampleTipKitView()
}
    
TipKit

 

www.admadic.de | webmaster@admadic.de | Legal Notice and Trademarks | Privacy
© 2005-2007 - admaDIC | All Rights Reserved
All other trademarks and/or registered trademarks are the property of their respective owners
Last Change: Thu Nov 6 08:51:42 2025 GMT