In my storyboard I have a UIViewController that contains an image view and a text view:
In my class I already handle a tap gesture - when user taps anywhere outside of the text view - the keyboard disappears:
override func viewDidLoad(){
super.viewDidLoad()
let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "dismissKeyboard")
view.addGestureRecognizer(tap)
}
func dismissKeyboard() {
view.endEditing(true)
}
Now, as you can see on my screenshot, the textview is pretty low, so when user taps it and the keyboard appears - it covers part of the textview itself. I would like to either move it up so it's more visible above the keyboard or - preferably, if that's even possible - for the time of editing - expand the size of textview so it covers the rest of the screen (and comes back to its normal size after user is done with editing). Can you help me with that?