Reputation: 3393
i am using IQKeyboardManager pod, for my swift 4.0 project.
IQKeyboardManager.sharedManager().enable = true
after pod update, the above code is not working.
Upvotes: 14
Views: 5763
Reputation: 79676
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
Upvotes: 19
Reputation: 2082
It Works Perfect
Uncheck the Allow App Extensions API only for IQKeyboardManager Pod.
To get it Click on Pod -> IQkeyboardManager See Image below
Upvotes: 0
Reputation: 176
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
}
Upvotes: 4