A welcome wave on the first screen

On a first-run screen, a character can introduce itself with one wave. “Continue” should already work while the avatar is loading or the hand is still in the air.

Read the guide
Rémi · Wave

Give the welcome one job

Choose who is greeting the visitor. A fixed host can introduce the product before a profile exists. Once the visitor builds their own face, switch the next screen to that saved recipe so it is clear which character belongs to them.

Place the greeting and continue button in ordinary SwiftUI. A shorter device, a longer translated heading, or a first-time asset load should never put the only way forward inside the 3D stage.

Put the wave on a separate button

This welcome view takes a host recipe and a continuation supplied by your onboarding flow. The performance starts on a deliberate tap. Someone who prefers a quiet introduction can read the greeting and continue immediately.

Swift
import SwiftUI
import Clayfaces

struct WelcomeStep: View {
    let host: AvatarRecipe
    let onContinue: () -> Void
    @State private var gesture: ClayfacesPerformance?

    var body: some View {
        VStack(spacing: 16) {
            Text("Welcome aboard").font(.title)
            ClayfacesView(appearance: host, performance: gesture)
                .aspectRatio(1, contentMode: .fit)
                .frame(maxWidth: 260)
                .accessibilityHidden(true)
            Button("Wave hello") {
                gesture = ClayfacesPerformance("person_waving")
            }
            Button("Continue", action: onContinue)
        }
    }
}

Try the fastest path through the screen

  1. Start a fresh install and tap Continue as soon as the heading appears. Navigation should succeed immediately.
  2. Return to the welcome screen and press Wave hello twice. A new performance event on each tap lets the second wave start again.
  3. Check the narrowest layout in your app. A square stage gives the waving hand space beside the cheek. With VoiceOver, the heading, Wave hello and Continue should read in that order.

Reference

Related guides

Add a 3D avatar to SwiftUIA profile avatar that remembers its owner