Created
July 24, 2020 11:00
-
-
Save amosgyamfi/22c4715d797cec0ab245cb586e862e51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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() | |
} | |
} |
Author
amosgyamfi
commented
Jul 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment