danielamitay / DAKeyboardControl

DAKeyboardControl adds keyboard awareness and scrolling dismissal (ala iMessages app) to any view with only 1 line of code.
Other
1.58k stars 214 forks source link

Strange behavior whith UIScreenEdgePanGestureRecognizer #76

Open paventuri opened 10 years ago

paventuri commented 10 years ago

Hello @danielamitay

I've started using your control and I found out one strange behavior in it while testing my app.

I forked your project and changed it to show what is happening. You can get the project here: https://github.com/paventuri/DAKeyboardControl.git

This is what I have in my app.

1 - TabbarController as rootViewController. 2 - Only one tab to make it simple. This tab contains an UINavigationController. 3 - UINavigationController rootView contains only 1 button to push another View. 4 - ViewController contains an UITableView with a textViewInput in a toolbar in the bottom of the view. 5 - I added the DAKeyboardControl component to the ViewController. So, when the user touches the textView, the keyboard will open and the frame of the tableview and toolbar will change. All works perfect here. The issue happens when the user scrolls the tableview all the way to the bottom and starts panning the screen from the left edge to perform a interactivePopGestureRecognizer. As the PopGestureRecognizer is perform, the frameBasedKeyboardDidMoveBlock is called resulting in changing the frame of tableview. Looks like the tableview is scrolling automatically.

Its a little bit confuse, thats why I forked your project and added the exactly scenario.

Please, take a look and advise if there is any work around to this behavior.

Thanks.