Prevent custom keyboard in textfield

后端 未结 4 1948
粉色の甜心
粉色の甜心 2021-01-04 06:55

I was experimenting with how a custom keyboard affects my app. I installed Swype on my iPhone 6.

I find that in some of my views where I have custom inputView prop

4条回答
  •  鱼传尺愫
    2021-01-04 07:19

    You can disable custom keyboard for your app with the following code:

    include this in your app delegate:

    - (BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier {
        if ([extensionPointIdentifier isEqualToString: UIApplicationKeyboardExtensionPointIdentifier]) {
            return NO;
        }
        return YES;
    }
    

提交回复
热议问题