michaeltyson / TPKeyboardAvoiding

A drop-in universal solution for moving text fields out of the way of the keyboard in iOS
http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/
zlib License
5.81k stars 926 forks source link

added TPKeyboardAvoidingAdditionsOptions protocol #210

Closed mrtristan closed 3 years ago

mrtristan commented 8 years ago

to allow for views to override specific pieces of functionality as needed

added TPKeyboardAvoiding_idealOffsetForViewAlwaysTop to allow views to be able to float to the top instead of middle use case: have an 'autocomplete' style dropdown for one of my textfields. Need as much room as possible between the field and the keyboard, this will (safely) alter the math in calculating the scroll position so the textfield can specify that it needs to be on the top instead of the middle