Swift: viewing text from keyboard

I have a text view at the bottom of a UIView, so when I touch the text view and keyboard, the keyboard will block the text view. How can I solve this problem? Can I enlarge the entire UIView when the keyboard appears? so the keyboard won't block anything

+3


source to share


1 answer


Is it possible to enlarge the entire UIView when the keyboard appears?

You can of course. Just change it as I am in this example .



Another way is to put your entire interface in a UIScrollView - not enabled so the user can scroll, but so you can scroll. When the keyboard appears, you change the content insertion and swipe up, and when the keyboard disappears, you change it. Here's my example of this approach.

+4


source







All Articles