Михаил Капелько 10 months ago
parent
commit
de42152b9f
3 changed files with 6 additions and 5 deletions
  1. +1
    -1
      Modules/BusX/BusUI/src/BusUI.TextField.swift
  2. +2
    -2
      Modules/MeetupIdX/src/MeetupId.TV.swift
  3. +3
    -2
      Modules/MeetupIdX/src/MeetupId.TVM.swift

+ 1
- 1
Modules/BusX/BusUI/src/BusUI.TextField.swift View File

@@ -17,7 +17,7 @@ extension BusUI {
self.textApp = textApp self.textApp = textApp
self.textUI = textUI self.textUI = textUI
/**/print("ИГР BusUTF(\(Unmanaged.passUnretained(self).toOpaque())).init textA/textU: '\(textApp)'/'\(textUI)'")
/**///print("ИГР BusUTF(\(Unmanaged.passUnretained(self).toOpaque())).init textA/textU: '\(textApp)'/'\(textUI)'")


$id $id
.sink { [weak self] v in self?.setup(v) } .sink { [weak self] v in self?.setup(v) }


+ 2
- 2
Modules/MeetupIdX/src/MeetupId.TV.swift View File

@@ -4,14 +4,14 @@ import SwiftUI
extension MeetupId { extension MeetupId {
public struct TV: View { public struct TV: View {
let id: String let id: String
@StateObject var vm = TVM()
@StateObject var vm = VM()
public init(_ id: String) { public init(_ id: String) {
self.id = id self.id = id
} }
public var body: some View { public var body: some View {
TextField("TV", value: vm.$textField.v, formatter: BusUI.TextFieldSource())
TextField("TV", value: $vm.textField.v, formatter: BusUI.TextFieldSource())
.padding(8) .padding(8)
.border(Color.blue) .border(Color.blue)
.animation(.easeInOut(duration: 0.3)) .animation(.easeInOut(duration: 0.3))


+ 3
- 2
Modules/MeetupIdX/src/MeetupId.TVM.swift View File

@@ -1,14 +1,15 @@
import BusX import BusX
import Combine


extension MeetupId { extension MeetupId {
public final class VM: ObservableObject { public final class VM: ObservableObject {
let textField = BusUI.TextField(K.testTextApp, K.testTextUI)
@Published public var id: String? @Published public var id: String?
@Published var textField = BusUI.TextField(K.testTextApp, K.testTextUI)
var subscriptions = [AnyCancellable]() var subscriptions = [AnyCancellable]()


public init() { } public init() { }


public setup(_ id: String) {
public func setup(_ id: String) {
/**/print("ИГР MeetupIV(\(Unmanaged.passUnretained(self).toOpaque())).setup id: '\(id)'") /**/print("ИГР MeetupIV(\(Unmanaged.passUnretained(self).toOpaque())).setup id: '\(id)'")
textField.id = id textField.id = id
} }


Loading…
Cancel
Save