Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Better alternative technique for dragging the keyboard on iOS 9/10 #495

Closed
wants to merge 17 commits into from

Conversation

dzenbot
Copy link

@dzenbot dzenbot commented Jul 20, 2016

Based on #355, this PR includes a more reliable solution for the keyboard panning feature:

  • The keyboard stub view is added to the key window's view hierarchy instead. This is particularly helpful for overlapping to any other view, specially when using UITabBar, view controller containment or modal presentations.
  • The stubbing logic is now controlled in SLKTextViewController.
  • Tested on iOS 7, 8, 9 and 10.

Downsides:

  • Because we perform a keyboard view snapshotting, custom keyboard with animations look frozen while dragging the keyboard (e.g. PopKey, GIF Keyboard, etc.).
  • Sometimes, the native keyboard's translucency is noticeable lost (depends on the content below the keyboard). This is not a big deal but obviously, not ideal.
  • Since we access the keyboard's window, things can break if the UIApplication's windows hierarchy change in future iOS releases. We will be monitoring this and try our best to patch.

Closes #355

untitled3

Ignacio Romero Zurbuchen added 17 commits February 16, 2016 13:41
…d up on iOS 9, without using any private APIs
…th the mockup. Reproducible by scrolling up very quickly, while the keyboard is visible.

This is a temporary fix, since it comes with a side effect too.
… keyboard snapshot/swap whenever the finger touches the input bar (much more reliable)
…and tweaks the internals to work in other edge cases.
…This helps avoiding a lag when dragging the text input bar while the keyboard placeholder isn't yet shown. Still needs tweaks.
…mproves the keyboard window hiding so it doesn't glitch too often.
@bradya
Copy link
Contributor

bradya commented Jul 20, 2016

We've decided against merging this in for now

@bradya bradya closed this Jul 20, 2016
@dzenbot dzenbot deleted the keyboard-panning-v3 branch October 4, 2016 01:23
@HansBrende
Copy link

@bradya @dzenbot What's the status of this behavior for iOS 9/10? Did you guys just give up on this or is something else in the works?

@efremidze
Copy link

efremidze commented May 18, 2017

I've created a branch with interactive keyboard panning support based on what u've proposed.
https://github.com/efremidze/SlackTextViewController/tree/feature/keyboard-panning

@lasha-ring lasha-ring mentioned this pull request Jul 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants