[Interest] Qt on iOS-9 - How to Disable Shortcuts Bar on Apple's Keyboard

Robert Iakobashvili coroberti at gmail.com
Mon Sep 21 12:33:16 CEST 2015


For the case that somebody needs it:

1. Disable predictive input in the window/text-field;

2. Pass the view/window/text-field as Wid (widget->winId()) to the
function below
   and disable two vectors/groups of UITextInputAssistantItem-s

void disable_iOS9_keyboard_shortcut_bar(void* window)
{
    if (!window)
        return;

    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0")) {
        UIView* view = (UIView*)window;

        // You can also iterate thru subviews if required.

        if ([view respondsToSelector:@selector(inputAssistantItem)]) {
            UITextInputAssistantItem *inputAssistantItem = [view
inputAssistantItem];

            inputAssistantItem.leadingBarButtonGroups = @[];
            inputAssistantItem.trailingBarButtonGroups = @[];

        }
    }
}

I hope this will help to somebody.
Regards,
Robert


On Sun, Sep 20, 2015 at 10:36 AM, Robert Iakobashvili
<coroberti at gmail.com> wrote:
> Gentlemen,
> iOS-9 adds to Apple's keyboard Shotcuts Bar taking space.
>
> Settings -> General -> Keyboard has a way to disable Shotcuts,
> and if predictive input is also disabled by either Settings or programmatically,
> user gets this extra space.
>
> We can disable predictive input by setting a hint to a text widget,
> but no way to get rid from Shotcuts Bar.
>
> Here's the suggestions found on net.
>
> https://forums.developer.apple.com/thread/4664
>
> http://stackoverflow.com/questions/31877080/hiding-copy-paste-return-panel-in-ios-9-shortcuts-panel
>
> How could it be done in Qt widget application, i.e. with QTextEdit?
>
> Your suggestions would be welcomed.
>
> Regards,
> Robert



More information about the Interest mailing list