CinematicOnboardingView-SwiftUI

repository·main·Indexed 41 days ago

https://github.com/adamlyttleapps/cinematiconboardingview-swiftui

A SwiftUI-based onboarding framework for creating bold, animated, and cinematic first impressions using layered animations and rich visuals. Features the OnboardingCinematicView for fullscreen presentation and customizable OnboardingTestimonial objects for user quotes and ratings.

Tokens
608
Snippets
2
Records
3
Agent score
1%

What's inside CinematicOnboardingView-SwiftUI

  1. Install CinematicOnboardingView-SwiftUI

    main

    To use this onboarding framework, you must manually add the source files and required assets to your Xcode project.

    1. Add Swift Files: Drag the following files into your project:

      • OnboardingCinematicView.swift
      • CustomAnimationFishPhotoView.swift
      • CustomAnimationDigitalSharkView.swift
      • Any other related view files included in the repository.
    2. Add Assets: Import the following images into your Assets.xcassets catalog:

      • hero-header, hero-footer
      • onboarding-fish-wireframe
      • onboarding-hand-animation-1, onboarding-hand-animation-2, onboarding-hand-animation-3
      • onboarding-shark
      • award-leaves, avatar-1, avatar-2, etc.
  2. Present the Onboarding View fullscreen

    main

    Use the OnboardingCinematicView within a .fullScreenCover modifier. You must pass a binding to a Boolean state variable (e.g., $isPresented) to control the visibility and allow the view to dismiss itself.

    struct ContentView: View {
        @State private var isPresented = true
        var body: some View {
            Text("Hello, world!")
                .fullScreenCover(isPresented: $isPresented) {
                    OnboardingCinematicView(
                        isPresented: $isPresented
                    )
                }
        }
    }
  3. Customize Testimonials

    main

    You can provide custom user quotes and star ratings by initializing an array of OnboardingTestimonial objects. Each testimonial requires an id, a title, and a description.

    @State private var testimonials: [OnboardingTestimonial] = [
        OnboardingTestimonial(id: 1, title: "Such a good app", description: "I never thought identifying insects could be this fun!"),
        OnboardingTestimonial(id: 2, title: "Super useful in the field", description: "Quick, reliable, and even shows me local species."),
    ]