6

I have three UIViews in a single UIViewController. Each UIView contains a UITextField . But IQKeyboardManager is not showing next and previous arrows as every textfield is in a different view.

Is there any solution for this?

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
Bindiya
  • 614
  • 2
  • 9
  • 23
  • try TPKeyboardAvoiding https://github.com/michaeltyson/TPKeyboardAvoiding .You have to add your 3 views in scrollView and subclas your scrollView from TPKeyboardAvoidingScrollView – Muhammad Adnan May 23 '16 at 13:13
  • @MuhammadAdnan , in TPKeyboardAvoiding I faced 2 situations . 1) My views expands as scrollview scrolls . As their height is relative to superview , not fixed . 2) After disabling the scroll view my view hangs . & in both of the cases the keyboard is hiding the last view which was already under the keyboard . – Bindiya May 24 '16 at 11:27
  • @MuhammadAdnan , I Have ScrollView and SubView as UIView and In View a have TextFields, I am Unable to Scroll the ScrollView Automically to TextField. I Tired to Set UiView which is under to ScrollView as IQPreviousNextView. But not Working.But the IQPreviousNextView work in case of Stack View. I am using the IQKeyboardManager – Charmi Feb 13 '17 at 08:43

1 Answers1

19

You can make UITextFields/UITextViews container view as IQPreviousNextView. It is designed to handle the situation you are facing. You can find it's demo on repository demo project.enter image description here

WINSergey
  • 1,977
  • 27
  • 39
Mohd Iftekhar Qurashi
  • 2,385
  • 3
  • 32
  • 44
  • Is there a way to do this only from the Storyboard? I tried changing the custom class of the container view to IQPreviousNextView to no avail. When I enable debugging it is only finding one responder sibling despite having two fields. – Daniel Allen Jan 21 '20 at 14:08
  • Ah, I see now. The common parent view of all views which contain UITextFields must be of type IQPreviousNextView. I was only setting the sibling container elements as that class. – Daniel Allen Jan 21 '20 at 14:15