Please HELP ME !!
There are two classes, FirstViewCtrl and SecondViewCtrl. In FirstViewCtrl, i have UIView and i have placed an UIScrollVIew inside that “. And in the SecondViewCtrl i have UIView(Consists of 3 TextField).
Now, i have linked that UIView from the SecondViewCtrl to the UIScrollView in the FirstViewCtrl [_bgScrollView addSubview:SecondViewCtrl.view];
Everything works fine until now.
I want to achieve a small task here, when the user clicks the TextField , the Keyboard Layout pops up and the Background screen should move up( I mean the Keyboard should not hide the TextField).
I have achieved it before but here its looks little different for me.
Because the UIScrollView is in the FirstViewCtrl and the TextField are in the SecondViewCtrl(which is UIView). I can get the textFieldShouldReturn in the SecondViewCtrl. How to move the BG Screen here ??
In simple, _bgScrollView is in FirstViewCtrl but i am handling the TextField in the SecondViewCtrl. How can i move the Background when the user select the TextField ?
I am really confused here , please help me !!!!
The general procedure for preventing the keyboard from covering up the text field is described in the Text, Web, and Editing Programming Guide for iOS, with example code. You need to subscribe to the keyboard show/hide notifications and adjust the
contentInsetproperty of your scroll view.If you don’t want your second view controller to know about your first view controller, you can just walk up the view hierarchy to find the scroll view. For example: