@@ -18,6 +18,7 @@ struct ContentView: View {
|
||||
@Environment(\.managedObjectContext) private var viewContext
|
||||
@AppStorage(UserDefaultsStore.Keys.needsOnboarding.rawValue, store: GroupUserDefaults.groupDefaults) private var needsOnboarding = true
|
||||
@AppStorage(UserDefaultsStore.Keys.deleteEnable.rawValue, store: GroupUserDefaults.groupDefaults) private var deleteEnabled = true
|
||||
@AppStorage(UserDefaultsStore.Keys.mainViewTopHeaderIndex.rawValue, store: GroupUserDefaults.groupDefaults) private var mainViewTopHeaderIndex = 0
|
||||
|
||||
@State private var showingSheet = false
|
||||
@State private var showTodayInput = true
|
||||
@@ -256,7 +257,8 @@ struct ContentView: View {
|
||||
.frame(height: headerHeight)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
} else {
|
||||
TabView {
|
||||
// selection hre doesn't work ...
|
||||
TabView(selection: $mainViewTopHeaderIndex) {
|
||||
SwitchableView(daysBack: 30)
|
||||
.frame(height: headerHeight)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -272,10 +274,6 @@ struct ContentView: View {
|
||||
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor.label
|
||||
UIPageControl.appearance().pageIndicatorTintColor = UIColor.black.withAlphaComponent(0.2)
|
||||
}
|
||||
.background(
|
||||
Color(UIColor.systemBackground)
|
||||
)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous))
|
||||
.padding([.trailing, .leading])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,19 @@ struct SwitchableView: View {
|
||||
HeaderPercView(fakeData: false, backDays: daysBack)
|
||||
.opacity(currentViewIdx == 1 ? 1 : 0)
|
||||
.allowsHitTesting(false)
|
||||
|
||||
VStack {
|
||||
HStack {
|
||||
Spacer()
|
||||
Image(systemName: "arrow.triangle.2.circlepath.circle")
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25, alignment: .trailing)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(.trailing, 8)
|
||||
.padding(.top, 8)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
.padding(.top, -7)
|
||||
|
||||
@@ -32,6 +45,10 @@ struct SwitchableView: View {
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.padding(.top, -12)
|
||||
}
|
||||
.background(
|
||||
Color(UIColor.systemBackground)
|
||||
)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous))
|
||||
.contentShape(Rectangle())
|
||||
.padding(.bottom, 30)
|
||||
.onTapGesture {
|
||||
|
||||
Reference in New Issue
Block a user