Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the shortcut bar in iOS9

I have a textfield with a hidden keyboard (since I'm using it with bluetooth). However, in iOS9 the shortcut bar keeps appearing.

Is there a way to hide it too?

Thank you so much!

like image 628
Jordi Puigdellívol Avatar asked Sep 16 '15 10:09

Jordi Puigdellívol


People also ask

What is the shortcut bar on iPad?

When you open Facebook on your iPhone, iPad or Android device, you'll see a menu with shortcuts to things like Events or Groups. From this shortcut bar, you'll also see notification dots to let you know about recent activity. You can change and personalize these shortcuts, and also turn off notifications dots.


2 Answers

You can pass your textfield name in place of userNameTextField for which you want to remove shortcut bar.

UITextInputAssistantItem* item = [userNameTextField inputAssistantItem]; item.leadingBarButtonGroups = @[]; item.trailingBarButtonGroups = @[]; 
like image 60
Dheeraj Singh Avatar answered Oct 08 '22 11:10

Dheeraj Singh


In Swift 2.0

if #available(iOS 9.0, *) {     let item : UITextInputAssistantItem = yourTextView.inputAssistantItem     item.leadingBarButtonGroups = []     item.trailingBarButtonGroups = [] } else {   // Fallback on earlier versions } 
like image 38
OverD Avatar answered Oct 08 '22 13:10

OverD