Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIKeyboard will change frame with interactive keyboard dismiss, not called continuously

I am trying to use the UITableView.keyboardDismissMode = UIScrollViewKeyboardDismissMode.Interactive, to be able to drag my keyboard up and down. However I can't find any way to track the keyboard frame to update my tableView frame and messaging view. I am simply trying to replicate the standard iMessage behaviour. Given the name, I would have thought that UIKeyboardWillChangeFrameNotification would have been perfect for tracking the keyboard frame changes, but it only notifies when the gesture ends and the keyboard animates up or down.

like image 464
TimWhiting Avatar asked Jul 17 '15 10:07

TimWhiting


1 Answers

I'm not sure if this will work but you could try to track the drag progress via the panGesture property on UIScrollView in your tableView. It wouldn't be a direct tracking of the keyboard frame, but if you know the keyboard's height and the progress/offset of the pan, you might be able to math your way around the problem.

like image 71
richiereitz Avatar answered Nov 10 '22 03:11

richiereitz