Complete overhaul of onboarding flow with 5 screens: 1. Welcome - Gradient intro with feature highlights 2. Time - Clean card-based time picker for reminders 3. Day - Tappable cards for today/yesterday selection 4. Style - Horizontal scrollable icon & color pickers 5. Subscription - Benefits list with free trial CTA Design improvements: - Beautiful gradient backgrounds on each screen - Consistent typography and visual hierarchy - White page indicators visible on all backgrounds - Haptic feedback on selections - "Maybe Later" option on subscription screen 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
62 lines
1.6 KiB
Swift
62 lines
1.6 KiB
Swift
//
|
|
// OnboardingMain.swift
|
|
// Feels (iOS)
|
|
//
|
|
// Created by Trey Tartt on 1/20/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct OnboardingMain: View {
|
|
@Environment(\.presentationMode) var presentationMode
|
|
@State var onboardingData: OnboardingData
|
|
@EnvironmentObject var iapManager: IAPManager
|
|
|
|
let updateBoardingDataClosure: ((OnboardingData) -> Void)
|
|
|
|
var body: some View {
|
|
TabView {
|
|
// 1. Welcome screen
|
|
OnboardingWelcome()
|
|
|
|
// 2. Reminder time
|
|
OnboardingTime(onboardingData: onboardingData)
|
|
|
|
// 3. Which day to rate
|
|
OnboardingDay(onboardingData: onboardingData)
|
|
|
|
// 4. Style customization
|
|
OnboardingStyle(onboardingData: onboardingData)
|
|
|
|
// 5. Subscription benefits & completion
|
|
OnboardingSubscription(
|
|
onboardingData: onboardingData,
|
|
completionClosure: { data in
|
|
updateBoardingDataClosure(data)
|
|
}
|
|
)
|
|
}
|
|
.ignoresSafeArea()
|
|
.tabViewStyle(.page)
|
|
.onAppear {
|
|
setupAppearance()
|
|
}
|
|
.interactiveDismissDisabled()
|
|
}
|
|
|
|
func setupAppearance() {
|
|
UIPageControl.appearance().currentPageIndicatorTintColor = .white
|
|
UIPageControl.appearance().pageIndicatorTintColor = UIColor.white.withAlphaComponent(0.3)
|
|
}
|
|
}
|
|
|
|
struct OnboardingMain_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
OnboardingMain(
|
|
onboardingData: OnboardingData(),
|
|
updateBoardingDataClosure: { _ in }
|
|
)
|
|
.environmentObject(IAPManager())
|
|
}
|
|
}
|