M
M
Mark2014-06-10 23:03:15
Objective-C
Mark, 2014-06-10 23:03:15

Shift view on UITextField select?

There are text fields, it is necessary that when it is selected, the view is shifted so that there is a keyboard immediately below the text field.
Are there ready-made solutions or can it be somehow provided in ios?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Morozov, 2014-06-11
@morozovdenis

hands, or look for third party solutions,
I always did it with my hands, track notifications and move what you need:

UIKeyboardDidShowNotification
UIKeyboardWillHideNotification

C
corristo, 2014-06-11
@corristo

As of iOS 7 this should work automatically if the UIViewController.automaticallyAdjustsScrollViewInsets property is set to YES. If you need to support iOS versions below 7, then see the previous answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question