Files
SwiftUI-LifeGame/iOS/Screen/PatternSelect/PatternSelectSheetView.swift
T
Yusuke Hosonuma ce6ad22efb fix
2020-09-18 09:54:02 +09:00

44 lines
1.1 KiB
Swift

//
// PatternSelectSheetView.swift
// LifeGameApp (iOS)
//
// Created by Yusuke Hosonuma on 2020/09/18.
//
import SwiftUI
struct PatternSelectSheetView: View {
@StateObject var store = PatternStore()
@Binding var presented: Bool
var body: some View {
NavigationView {
TabView {
PatternCategoryListView(store: store, presented: $presented)
.tabItem {
Image(systemName: "magnifyingglass")
Text("Find")
}
MyPatternListView(store: store, presented: $presented)
.tabItem {
Image(systemName: "person.crop.circle")
Text("My Page")
}
}
.navigationTitle("Select pattern")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel", action: tapCancel)
}
}
}
}
// MARK: Actions
private func tapCancel() {
presented = false
}
}