How does one disable third party keyboards in Swift?

前端 未结 5 445
半阙折子戏
半阙折子戏 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:53

    In Swift 5.0

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

提交回复
热议问题