问题产生的条件:

ZHVerifyCodeFiled
作为我写在Cocoapods
的空间,现在我在测试例子的Main.storyboard
直接添加一个UIView
使用我们Cocoapods
的这个类,但是我们运行发现出来的对象还是UIView
类。


如果我在代码导入这个类
import ZHVerifyCodeFiled
直接使用代码创建时可以创建成功的。
下面是这个类的初始化方法
public required init(number:Int, frame:CGRect = CGRect.zero) {
self.item = number
super.init(frame: frame)
self.collectionView.frame = frame
self.addSubview(self.collectionView)
}
public convenience override init(frame: CGRect) {
self.init(number: 4, frame: frame)
}
public convenience required init?(coder aDecoder: NSCoder) {
self.init(number: 4)
}
解决办法

使用类的Module
要使用包含我们使用类的Module
才可以