i am using IQKeyboardManager pod, for my swift 4.0 project.
IQKeyboardManager.sharedManager().enable = true
after pod update, the above code is not working.
Here is an answer to your question: Type 'IQKeyboardManager' has no member 'sharedManager' by hackiftekhar
Since IQKeyboardManagerSwift version 6.0.0, sharedManager()
has been replaced with shared
For pod 'IQKeyboardManagerSwift' or pod 'IQKeyboardManagerSwift', '6.0.0', try this:
IQKeyboardManager.shared.enable = true
Look at this: https://github.com/hackiftekhar/IQKeyboardManager/blob/master/IQKeyboardManagerSwift/IQKeyboardManager.swift
Swift Demo code by IQKeyboardManager
For pod 'IQKeyboardManagerSwift', '5.0.0', try this
IQKeyboardManager.sharedManager().enable = true
Use this code.it's perfectly working in swift4. install pod file .
pod 'IQKeyboardManager'
import IQKeyboardManager in AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
IQKeyboardManager.shared().isEnabled = true
return true
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With