Skip to content

Instantly share code, notes, and snippets.

@jfahrenkrug
Created January 2, 2023 10:30
Show Gist options
  • Save jfahrenkrug/7817719a03c3e4363710d00ffda81377 to your computer and use it in GitHub Desktop.
Save jfahrenkrug/7817719a03c3e4363710d00ffda81377 to your computer and use it in GitHub Desktop.
import SwiftUI
import Combine
class ViewModel: ObservableObject {
@Published var sentence = ""
}
struct ContentView: View {
@ObservedObject var viewModel = ViewModel()
var body: some View {
VStack {
TextField("Sentence", text: $viewModel.sentence).font(.system(size: 34))
Spacer()
Text("😐").font(.system(size: 134))
Spacer()
}
.padding()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment