I have a TabBar app with one of its tabs embedded in a NavigationController. This particular view is a form with text fields on it. I want to us the TPKeyboardAvoidingScrollView to move the UITextFields up when the keyboard moves into view. I have followed the instructions on the Github page but it just does not work at all.
This is what I have done as per the instructions:
- Added the TPKeyboardAvoidingScrollView.h and .m to my project
- Added a UIScrollView to the view on the storyboard (Xcode 4.3.1)
- Selected the ScrollView and in the inspector changed its class to TPKeyboardAvoidingScrollView
- Moved all my textfields into the UIScrollView
This did not work... So looking at the sample code I tried adding a few more things:
In my view controllers .h file I added:
@class TPKeyboardAvoidingScrollView;
and linked the ScrollView resulting in this line of code being added:
@property (weak, nonatomic) IBOutlet TPKeyboardAvoidingScrollView *scrollView;
Imported the TPKeyboardAvoidingScrollView.h into my controllers .m file.
But still the drop-in code that everybody else seems to praise just does not work for me.
Can anyone point out my incompetence please? Thanks in advance for any assistance you may be able to provide...