没有这样的模块IQKeyboardManagerSwift [英] No such Module IQKeyboardManagerSwift
问题描述
在此处输入图片描述我是iOS
Swift
的新手,正在尝试安装此框架.
enter image description hereI am new to iOS
Swift
and trying to install this framework.
我已经通过cocoa pods
安装了此框架,并将此行添加到应用程序委托中
I have installed this framework by cocoa pods
and add this line in app delegate
import IQKeyboardManagerSwift & IQKeyboardManager.sharedManager().enable = true
我现在收到此错误(
没有此类模块IQKeyboardManagerSwift)
No such Module IQKeyboardManagerSwift)
有人可以帮助我吗?
推荐答案
首先检查您正在使用的swift和Xcode版本,如果该版本支持您正在使用的pod文件
First check the swift and Xcode version that you are using and if that version support the pod file you are using
Swift 2.2 (Xcode 7.3)
使用:-
pod 'IQKeyboardManagerSwift'
或
pod 'IQKeyboardManagerSwift', '4.0.3'
对于Swift 2.1.1 (Xcode 7.2)
使用:-
pod 'IQKeyboardManagerSwift', '4.0.0'
对于Swift 2.0 (Xcode 7.0)
使用:-
pod 'IQKeyboardManagerSwift', '3.3.3.1'
我有类似的问题,原来我安装了两个Cocoapods实例,这是一个Cocoapods问题,而不是Xcode(在我的情况下是).
I had similar problem , turns out i had two Cocoapods instances installed, This is a Cocoapods issue not an Xcode one (in my case it was').
我要做的就是卸载我的cocoapod并重新安装 https://stackoverflow.com/a/27940867/6297658 ...... 这对我有用...
All i needed to do was uninstall my cocoapod and reinstall it https://stackoverflow.com/a/27940867/6297658...... This worked for me...
完成重新安装后,转到pod文件,根据您使用的swift和Xcode的版本添加pod,然后运行pod install
Once you are done reinstalling go to your pod file add pods according to the version of swift and Xcode you are using and then run pod install
PS:Cocoapods REPO将近350MB,因此,如果您的下载卡住了,请不要只是退出Terminal
并重新开始重新安装,请先完全卸载Cocoapods
和old master repo
,然后再重新安装...这是在我的情况下可能是导致它的两个实例的原因
PS: Cocoapods REPO is nearly 350MB, so if your download is stuck don't just quit Terminal
and start reinstalling again first uninstall Cocoapods
and old master repo
both completely, then start installing again ... this is probably what caused two instances of it in my case
这篇关于没有这样的模块IQKeyboardManagerSwift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!