Here is my code:
import SwiftUI
struct SendingView: View {
//Only set when user taps "All Users"
var TargetTopic: String
//Only set when user selects specific people/groups
var UUIDTargets: Array<String> = []
//Body of the notification
@State var NotificationMessage = "Body"
@State var NotificationTitle = "Title"
var body: some View {
VStack {
Image("NotificationExample")
.resizable()
.cornerRadius(10)
.padding()
.frame(height: 100)
TextEditor(text: $NotificationTitle)
.autocapitalization(.words)
.frame(height: 100)
.background(RoundedRectangle(cornerRadius:6).stroke(Color("Dominant"),lineWidth:2))
.padding()
TextEditor(text: $NotificationMessage)
.autocapitalization(.words)
.frame(height: 300)
.background(RoundedRectangle(cornerRadius:6).stroke(Color("Dominant"),lineWidth:2))
.padding()
Spacer(minLength: 0)
}
}
}
How can I quickly exit the text view, because as you can see if you run the code, it quickly becomes hard to use and definitely not user friendly.