How does one disable third party keyboards in Swift?

前端 未结 5 435
半阙折子戏
半阙折子戏 2020-12-16 19:35

Basically that\'s it, I haven\'t found a way to disable third party keyboard in my app, although I know it\'s possible \'cos I\'ve seen it in apps like 1Password.

An

5条回答
  •  轮回少年
    2020-12-16 19:57

    Swift 4.2

    func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplication.ExtensionPointIdentifier) -> Bool {
        if extensionPointIdentifier == UIApplication.ExtensionPointIdentifier.keyboard {
            return false
        }
        return true
    }
    

提交回复
热议问题