How to hide Toolbar in IQKeyboardManager iOS Swift 3

后端 未结 10 2167
南笙
南笙 2021-01-12 09:35

I\'m using the IQKeyboardManger library to scroll text fields when started typing using the keyboard, but I don\'t want to display the default toolbar from their library. Be

10条回答
  •  天命终不由人
    2021-01-12 10:04

    Swift 5.1, Xcode 11

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    
        IQKeyboardManager.shared.enable = true
        IQKeyboardManager.shared.enableAutoToolbar = false
        IQKeyboardManager.shared.shouldShowToolbarPlaceholder = false
        IQKeyboardManager.shared.shouldResignOnTouchOutside = true
    
        return true
    }
    

提交回复
热议问题