1

I have a RootViewController in which there is a contentView which is of type UIView,where i'm adding a UIView as a subview.My RootViewController is of 768 x 1024 dimensions, and my contentView is of 400 x 500, inside my contentView i'm adding a custom UIView which contains some UITextFields, i have written Keyboard managing code inside this view class but keyboard appears from my RootViewController class so what ever frames of my activeTextField is coming is with respect to my subView class & keyboards frame is wrt RootViewController, how can i manage keyboard hiding textFields in this kinda scenarios? Any help is appreciated in advance.

Graham Bell
  • 1,139
  • 1
  • 14
  • 30

1 Answers1

0

This a form of a question asked and answered frequently in SO. The twist you've added is that the text fields being obscured by the keyboard are deeper in the view hierarchy.

But the answer is the same: when the textfield becomes first responder it needs to be moved so user can see it. You can move the text field, or it's parent view or it's grandparent view, etc., but it needs to move.

Edit (here as well. google "ios keyboard hides text field" and see more)

Community
  • 1
  • 1
danh
  • 62,181
  • 10
  • 95
  • 136