7

On iPad, I have a text field in the modal; when I tap on the text field to bring up keyboard, the whole modal view will move up, to have the least area covered by keyboard.

I don't want this behavior, because my text field will not be covered by keyboard anyway. How can I disable this behavior?

lichen19853
  • 1,410
  • 2
  • 14
  • 21
  • similar question: http://stackoverflow.com/questions/7932595/with-uipresentationformsheet-why-doesnt-my-view-move-above-the-keyboard-when-i – hchouhan02 Aug 12 '13 at 12:11
  • you can try this https://gist.github.com/Johnykutty/dc753461af32c0c528655bb062847147 – Johnykutty Apr 11 '16 at 09:31

2 Answers2

0

As a fall back, you could make your own window, and add your view to it, rather than put your view in an Apple managed modal view.

Cris
  • 464
  • 1
  • 3
  • 15
0

For this follow this scenario..
add some tag to the textfield..then in -(void)textViewDidBeginEditing:(UITextView *)textView method give condition like if the textfield tag is not equal to your preDefined tag than move the modal view to up..
I hope it will works..