Files
check-ios-bus/src/V.swift
Михаил Капелько 8cd10b105d d
2023-12-26 13:46:31 +03:00

29 lines
570 B
Swift

import SwiftUI
struct V: View {
@StateObject var vm = VM()
var body: some View {
VStack {
HStack {
Text("Check text field:")
Text("'\(vm.text)'")
.fontWeight(.bold)
}
TextField("Binding-3", value: $vm.text, formatter: TextFieldValueOwner())
.padding(8)
.border(Color.blue, width: 2)
Button(action: vm.join.send) {
Text("Join")
.padding(8)
.border(vm.isJoinAvailable ? Color.green : Color.red, width: 4)
}
}
.frame(width: 320)
.padding()
}
}