slackhq / SlackTextViewController

⛔️**DEPRECATED** ⛔️ A drop-in UIViewController subclass with a growing text input view and other useful messaging features
https://slack.com/
MIT License
8.32k stars 1.08k forks source link

Help on understand the inputBar and view position adjustments when presenting keyboard #313

Closed luizv closed 9 years ago

luizv commented 9 years ago

Hi, i'm customizing the SlackTextViewController to behavior well inside a UITableViewCell.

I'm hoping someone could point me which function is handling the adjustments of the view height/inset/scrolling when presenting keyboard.

My Problem When I tap the textInputbar it goes up 2 times the height of the keyboard. Then, when keyboard is fully presented, it readjust itself to the correct position, glued to the keyboard's top edge.

What i tried: When i set ignoreTextInputbarAdjustment to return false, the the inputBar comes up with the keyboard as i want it to behavior, but then, when the keyboard is fully displayed, the view "readjusts" itself to the start position, docked at the bottom, behind the keyboard.

What i'm asking: Where I find the place where this readjustment behavior is defined? I'm not very skilled with Objective-C. Could someone point the direction to me?!

Thank you very very much.

dzenbot commented 9 years ago

These are the two methods you might want to tweak to satisfy your requirements: https://github.com/slackhq/SlackTextViewController/blob/master/Source/SLKTextViewController.m#L384 https://github.com/slackhq/SlackTextViewController/blob/master/Source/SLKTextViewController.m#L398

Where the "appropriate" height of the keyboard if calculated.

luizv commented 9 years ago

Thank you. I solved it by reprogramming the view to insert it in a scrollview. Works as it should now!

dzenbot commented 9 years ago

👏