Hide KeyBoard Shortcuts Bar on a iOS Custom Keyboard
Hide KeyBoard Shortcuts Bar on a iOS Custom Keyboard
I am trying to build a custom keyboard for general use across many apps. I would like to hide the Keyboard Shortcuts Bar, but I am struggling to do this. All the posts on the forum that I have seen so far refer to using "inputAssistantItem.leadingBarButtonGroups.removeAll()" or "inputAssistantItem.leadingBarButtonGroups = " with a textfield.
However, as I want to use this generally as opposed to just within my own app, I can't access a textfield.
I am trying to use it with the view as shown below, but obviously not working. I have tried so many variations now that I am completely confused.
Here is a snippet of my code:
import UIKit
class KeyboardViewController: UIInputViewController {
@IBOutlet var nextKeyboardButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
let nib = UINib(nibName: "golfview", bundle: nil)
let objects = nib.instantiate(withOwner: self, options: nil)
view = objects[0] as! UIView;
//get rid of top bar of keyboard
view.inputAssistantItem.leadingBarButtonGroups =
view.inputAssistantItem.trailingBarButtonGroups =
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Comments
Post a Comment