Skip to content

Instantly share code, notes, and snippets.

@amosgyamfi
Created July 24, 2020 11:00
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 amosgyamfi/22c4715d797cec0ab245cb586e862e51 to your computer and use it in GitHub Desktop.
Save amosgyamfi/22c4715d797cec0ab245cb586e862e51 to your computer and use it in GitHub Desktop.
//
// ContentView.swift
// SwiftUI Multiline Text Editor
//
// Created by Amos Gyamfi on 24.7.2020.
//
import SwiftUI
struct ContentView: View {
@State private var fieldPlaceholder = "Enter your multiline text here!!!"
var body: some View {
VStack(alignment: .leading) {
Text("Multiline Text")
TextEditor(text: $fieldPlaceholder)
.frame(width: 300, height: 100)
.foregroundColor(.blue)
.background(Color(.systemGray))
.border(Color(.systemGray5), width: 2)
.cornerRadius(2)
.shadow(color: .gray, radius: 1, x: 1, y: 1)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
@amosgyamfi
Copy link
Author

multiline_text_editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment