How does one disable third party keyboards in Swift?

前端 未结 5 442
半阙折子戏
半阙折子戏 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 20:07

    Swift 3 :

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

提交回复
热议问题