- Initialize iOS project with 6-tab navigation structure - Configure custom Light/Dark themes and AppColors - Define SwiftData models for Tasks, Tags, Goals, and TrackingRecords - Setup relationships (Super/Sub tags) and cascade delete rules - Implement Observable TrackingEngine for real-time timer updates
43 lines
1.1 KiB
Swift
43 lines
1.1 KiB
Swift
//
|
|
// ContentView.swift
|
|
// TallyFlow
|
|
//
|
|
// Created by 송예찬 on 6/26/26.
|
|
//
|
|
import SwiftData
|
|
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@Environment(AppPreferences.self) private var preferences
|
|
@State private var isShowingSplash = true
|
|
|
|
var body: some View {
|
|
Group {
|
|
if isShowingSplash {
|
|
SplashView()
|
|
.transition(.opacity)
|
|
.onAppear {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 1.8) {
|
|
withAnimation(.easeOut(duration: 0.4)) {
|
|
isShowingSplash = false
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
RootTabView()
|
|
.transition(.opacity)
|
|
}
|
|
}
|
|
.preferredColorScheme(preferences.themeMode.colorScheme)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
ContentView()
|
|
.modelContainer(
|
|
for: [TaskItem.self, TagEntity.self, GoalEntity.self, TrackingRecord.self],
|
|
inMemory: true
|
|
)
|
|
.environment(AppPreferences())
|
|
}
|