add apple tv app
This commit is contained in:
37
iphone/Werkout_ios/subview/AllWorkoutPickerView.swift
Normal file
37
iphone/Werkout_ios/subview/AllWorkoutPickerView.swift
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// AllWorkoutPickerView.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 7/7/23.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct AllWorkoutPickerView: View {
|
||||
var mainViews: [MainViewTypes]
|
||||
@Binding var selectedSegment: MainViewTypes
|
||||
@StateObject var bridgeModule = BridgeModule.shared
|
||||
var showCurrentWorkout: (() -> Void)
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Picker("", selection: $selectedSegment) {
|
||||
ForEach(mainViews, id: \.self) { viewType in
|
||||
Text(viewType.title)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.padding([.top, .leading, .trailing])
|
||||
|
||||
if bridgeModule.isInWorkout {
|
||||
Button(action: {
|
||||
showCurrentWorkout()
|
||||
}, label: {
|
||||
Image(systemName: "figure.strengthtraining.traditional")
|
||||
.padding(.trailing)
|
||||
})
|
||||
.tint(Color("appColor"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user