Reconfigure iOS project to not be weird.
This commit is contained in:
30
CarControlleriOS/CarController/SimpleControllerView.swift
Normal file
30
CarControlleriOS/CarController/SimpleControllerView.swift
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// SimpleControllerView.swift
|
||||
// CarController
|
||||
//
|
||||
// Created by Michael Pivato on 13/4/20.
|
||||
// Copyright © 2020 Michael Pivato. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SimpleControllerView: View {
|
||||
@EnvironmentObject var server: ServerData
|
||||
@State var throttle: Float = 0
|
||||
@State var steering: Float = 0
|
||||
|
||||
var body: some View {
|
||||
HStack{
|
||||
Text("Opened Simple Controller!")
|
||||
Slider(value: $throttle)
|
||||
Slider(value: $steering)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SimpleControllerView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
SimpleControllerView()
|
||||
.environmentObject(ServerData())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user