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

Hide Globe on iPhoneXs? #129

Open
otbox21 opened this issue Nov 8, 2018 · 3 comments
Open

Hide Globe on iPhoneXs? #129

otbox21 opened this issue Nov 8, 2018 · 3 comments

Comments

@otbox21
Copy link

otbox21 commented Nov 8, 2018

I'm trying to write a function that checks if the device is an X model, so that it removes the Globe key. I'm using DeviceGuru, but having problems. If anyone has a quick solution, let me know please!

@faraz-hussain
Copy link

We had created a variable in KeyboardViewController.swift that used the needsInputModeSwitchKey instance property Apple had introduced in iOS 11, but our implementation no longer seems to work with X and XS phones on iOS 12. Please let me know if you find a better solution...

    var globeKeyShouldDisplay = true

    KeyboardViewController.shared = self
    
    if #available(iOSApplicationExtension 11.0, *) {
        self.globeKeyShouldDisplay = self.needsInputModeSwitchKey
    }
    
    self.keyboard = defaultKeyboard()

@layik
Copy link

layik commented Apr 1, 2019

In Objective C, I could detect it using

    if (@available(iOS 11.0, *)) {
        if(self.needsInputModeSwitchKey) {
            // do tweaks
        }
    }

What I am struggling with is moving the keyboard above the "safe area".

@1fr0st
Copy link

1fr0st commented Oct 25, 2019

@layik Hello , have you found a fix on moving the keyboard above the safe area?
have you tried using safeAreaLayout?

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

No branches or pull requests

4 participants