Skip to content

Instantly share code, notes, and snippets.

@liorazi
Created June 11, 2019 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liorazi/fa31a018a9a5782feb5bb58de3f68867 to your computer and use it in GitHub Desktop.
Save liorazi/fa31a018a9a5782feb5bb58de3f68867 to your computer and use it in GitHub Desktop.
SwiftUI monospaced example
import PlaygroundSupport
import SwiftUI
struct LiveView: View {
var body: some View {
VStack(alignment: .leading) {
Text("Hello World 999")
.font(.system(.title, design: .monospaced))
Text("Hello World 111")
.font(.system(.title, design: .monospaced))
.color(.blue)
}
}
}
PlaygroundPage.current.liveView = UIHostingController(rootView: LiveView())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment