0


I have created a messaging application with multiple text fields that exist int the bottom of the screen. Unfortunately, when I click to edit the text field the keyboard covers it up. I have done much searching and have come to the conclusion that the only way to move the text field is to incorporate a scroll view - something I did not do when developing the application. I figure the next best thing is to temporarily create a UITextField that rests on top of the keyboard that displays user input (the same input being entered into the real UITextField). I have not been able to find a good way to do this as I would need it to disappear once the keyboard is resigned. Can anyone suggest how I would go about doing this?
Thank you.
Nick

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Nick Pitoniak
  • 97
  • 1
  • 8
  • 5
    See this question: http://stackoverflow.com/q/1126726/1183577 – fluidsonic Dec 02 '15 at 01:26
  • 1
    You should move up the view. – tuledev Dec 02 '15 at 01:57
  • You should consider using a scroll view and implementing Jacky's solution. I believe it will be the easiest way and save you a lot of UI coding. All you need to do is put your text fields in a scroll view and then subclass the scroll view as described in Jacky's link. – tnev Dec 02 '15 at 03:14

1 Answers1

0

For this you will have to embed your complete view into a scroll view and then bring the textfield above the keyboard programmatically when EditingBegin event occurs. There is a wonderful example explained in Apple's documentation here. Please check the "Moving Content That Is Located Under the Keyboard" section of the mentioned documentation. It address your exact problem.

Rohan Sanap
  • 2,773
  • 2
  • 21
  • 39