如何快速导入自定义框架中存在的类 [英] how to import a class present inside a custom framework in swift
本文介绍了如何快速导入自定义框架中存在的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个自定义框架,其中包含一些公共类.但是我无法使用该公共类. 在目标C中,我们可以导入为
I have a custom frame work and it contains some public class.But i cannot able to use that public class. In objective C we can import as
#import <XYZ/XYZCustomCell.h>
但是怎么可能迅速
推荐答案
使用"import"关键字导入模块,其工作方式如下:
You import a module using the "import" keyword, it works the following way:
import XYZ
如果只想导入结构/函数/枚举,则可以执行以下操作:
If you want to import a struct/function/enum only, you can do this:
import struct XYZ.SomeStruct
import func XYZ.someFunc
该语法适合于类型别名,结构,类,枚举,协议,var或func.
That syntax fits for typealias, struct, class, enum, protocol, var, or func.
这篇关于如何快速导入自定义框架中存在的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文