I wanted to know how to save the data in a UITextView once the application is double tapped out/force quitted. Is there some code I can write on the textViewDidChange call that can automatically save the input? The following is my code:
class Coordinator : NSObject,UITextViewDelegate {
var parent : MultiTextField
init(parent1 : MultiTextField) {
parent = parent1
}
func textViewDidBeginEditing(_ textView: UITextView) {
textView.textColor = .black
}
func textViewDidChange(_ textView: UITextView) {
self.parent.obj.size = textView.contentSize.height
}
func textViewDidEndEditing(_ textView: UITextView) {
print("Editing is done")
}