Search code examples
xcodeios-simulatorios9

How to close this bottom bar in iOS9 simulator?


enter image description here

enter image description here

When I use iOS9 simulator, a bottom bar will be shown over my app. When keyboard appears, it can do some undo / paste actions. In the first picture, I even cannot see my UITabBar now. What is this bar and how can I close it?


Solution

  • You've got two options:

    1) Settings:

    Settings -> General -> Keyboard ->Shortcuts -> Switch to off    
    

    2) Code (iOS 9 +):

    Objective-c:

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

    Swift:

    textField.inputAssistantItem.leadingBarButtonGroups = []
    textField.inputAssistantItem.trailingBarButtonGroups = []