Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use native iOS keyboard color #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radex
Copy link
Contributor

@radex radex commented Jun 18, 2018

RCTRootView always sets white as the backgroundcolor, which is a problem if we want to make a keyboard that looks and feels like the native iOS keyboard, like so:

simulator screen shot - iphone x - 2018-06-18 at 12 02 50

What we need for that is to have UIInputView as the background. Note that we can't just use a <View> with a solid background color, because UIInputView has a slight blur effect. We also can't pretend that a solid color is "close enough", because on iPhone X there's a little chin that has the native effect. Adding UIInputView inside the RCTRootView hierarchy also doesn't work AFAICT.

So the only solution I found is to simply remove RCTRootView's color when inserting it into RCTCustomKeyboardViewController hierarchy and it works fine.

@artald
Copy link
Collaborator

artald commented Jun 18, 2018

While I totally get your point, I am worried that with this change there might be an unwanted effect in case the rendered keyboard component does have a background color (you would probably see it flickering).

What do you think about supporting a background color for the root view as a param? you can set it to transparent explicitly, or to any color that you wish; if you don't pass a color it will stay as it was (backwards compatible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants