I'm trying to make the text field txtAdd
swipe up when the keyboard shows up, but I'm not really sure how to do it.
This is the code for adding items to the list:
@IBAction func submitBntFunc(_ sender: Any) {
if let text = txtAdd.text{
if text == ""{
return
}
txtAdd.text = ""
txtAdd.resignFirstResponder()
return txtField.text.append("\(text) \n")
}
}
I tried with the code below but it didn't really work.
guard let keyboardSize = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue else {return}