d
This commit is contained in:
@@ -12,7 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate
|
|||||||
window = UIWindow(frame: UIScreen.main.bounds)
|
window = UIWindow(frame: UIScreen.main.bounds)
|
||||||
let vc = UIViewController()
|
let vc = UIViewController()
|
||||||
addSwiftUIViewAsChild(swiftUIView: V(), parent: vc.view)
|
addSwiftUIViewAsChild(swiftUIView: V(), parent: vc.view)
|
||||||
vc.view.backgroundColor = .gray
|
vc.view.backgroundColor = .white
|
||||||
window?.rootViewController = vc
|
window?.rootViewController = vc
|
||||||
window?.backgroundColor = UIColor.white
|
window?.backgroundColor = UIColor.white
|
||||||
window?.makeKeyAndVisible()
|
window?.makeKeyAndVisible()
|
||||||
|
|||||||
6
src/MeetupId.yml
Normal file
6
src/MeetupId.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
model:
|
||||||
|
textApp: [String, ""]
|
||||||
|
textUI: [String, ""]
|
||||||
|
|
||||||
@@ -13,7 +13,14 @@ struct V: View {
|
|||||||
|
|
||||||
TextField("Binding-3", value: $vm.text, formatter: TextFieldValueOwner())
|
TextField("Binding-3", value: $vm.text, formatter: TextFieldValueOwner())
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.border(Color.green, width: 4)
|
.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)
|
.frame(width: 320)
|
||||||
.padding()
|
.padding()
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ final class VM: ObservableObject {
|
|||||||
MeetupId.K.meetupIdTextApp.rawValue,
|
MeetupId.K.meetupIdTextApp.rawValue,
|
||||||
MeetupId.onlyFormat
|
MeetupId.onlyFormat
|
||||||
)
|
)
|
||||||
|
var isJoinAvailable = true
|
||||||
|
let join = PassthroughSubject<Void, Never>()
|
||||||
var subscriptions = [AnyCancellable]()
|
var subscriptions = [AnyCancellable]()
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
|||||||
Reference in New Issue
Block a user