1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 14:50:32 +05:30
yattee/Apple TV/TrendingCategorySelectionView.swift

30 lines
811 B
Swift
Raw Normal View History

2021-06-17 15:32:39 +05:30
import SwiftUI
struct TrendingCategorySelectionView: View {
@Environment(\.presentationMode) private var presentationMode
@Binding var selectedCategory: TrendingCategory
var body: some View {
ZStack {
VisualEffectView(effect: UIBlurEffect(style: .dark))
VStack(alignment: .leading) {
Spacer()
ForEach(TrendingCategory.allCases) { category in
Button(category.name) {
selectedCategory = category
presentationMode.wrappedValue.dismiss()
}
}
.frame(width: 800)
Spacer()
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.edgesIgnoringSafeArea(.all)
}
}