bigger header
page will always respond to swipe
This commit is contained in:
@@ -18,23 +18,22 @@ struct SwitchableView: View {
|
||||
ZStack {
|
||||
HeaderStatsView(fakeData: false, backDays: daysBack)
|
||||
.opacity(currentViewIdx == 0 ? 1 : 0)
|
||||
.allowsHitTesting(false)
|
||||
|
||||
HeaderPercView(fakeData: false, backDays: daysBack)
|
||||
.opacity(currentViewIdx == 1 ? 1 : 0)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
.padding([.top, .bottom], -7)
|
||||
.padding(.top, -7)
|
||||
|
||||
Text(String(format: String(localized: "content_view_header_title"), daysBack))
|
||||
.font(.body)
|
||||
.foregroundColor(Color(UIColor.systemGray))
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
.padding(.bottom, 15)
|
||||
.padding(.top, -12)
|
||||
}
|
||||
.background(
|
||||
Color(UIColor.systemBackground)
|
||||
)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous))
|
||||
.padding()
|
||||
.contentShape(Rectangle())
|
||||
.padding(.bottom, 30)
|
||||
.onTapGesture {
|
||||
currentViewIdx += 1
|
||||
if currentViewIdx == 2 {
|
||||
|
||||
Reference in New Issue
Block a user