ar
This commit is contained in:
1 parent
777f340fb8
commit
9b76492c70
5 files changed
+3
-36
No files matched your search
@@ -1,11 +0,0 @@
|
||||
import SwiftCrossUI
|
||||
|
||||
final class HPVM: ObservableObject {
|
||||
@Published var countText = ""
|
||||
|
||||
static private(set) weak var shared: HPVM?
|
||||
|
||||
init() {
|
||||
Self.shared = self
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import SwiftCrossUI
|
||||
|
||||
struct HPView: View {
|
||||
@State var vm: HPVM
|
||||
|
||||
init(_ vm: HPVM) {
|
||||
self.vm = vm
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 16) {
|
||||
Text("Hello, platform!")
|
||||
.font(.largeTitle)
|
||||
Text(vm.countText)
|
||||
.font(.title3.monospaced())
|
||||
Button("Increment") {
|
||||
hpSet(F.didClickIncrement, true)
|
||||
}
|
||||
}
|
||||
.padding(40)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user