0

I wanted to prevent keyboard from covering a textfield. I embedded things in my View in ScrollView, wrote some code and set up constraints. Everything works fine, except the text field is out of sight and you have to scroll down to find it. I tried to set up vertical spacing from the text field to Bottom Layout Guide, but then when you click on the text field it is again covered by keyboard. What should I do? I attach some photos of how this looks and my ViewController hierarchy. when screen appearswhen you scroll downhierarchy

mzmyslowski
  • 111
  • 1
  • 2
  • 10

1 Answers1

0

For showing the textfields without being hidden by the keyboard, the standard way is to move up/down the view having textfields whenever the keyboard is shown.

Check How to make a UITextField move up when keyboard is present?

Community
  • 1
  • 1
Debaprio B
  • 363
  • 4
  • 9
  • Yeah, I did it, but then when the view appears the text field is out of sight and I have to scroll down to see it. – mzmyslowski Jun 29 '16 at 18:10