我在我的项目中使用 AFNetworking,我想在#import "UIRefreshControl+AFNetworking.h"中创建 refreshcontroller
但很快我只能let refreshControl: UIRefreshControl
任何我可以像objc一样导入的方式
#import "UIRefreshControl+AFNetworking.h"
我可以在 UIRefreshControl+AFNetworking.h 中使用刷新 Controller
谢谢
最佳答案
您需要在您的桥接头文件中进行导入,查看 Swift and Objective-C in the Same Project
然后它与您与 Objective-C 正常互操作的方式相同。
refreshControler.setRefreshingWithStateOfTask(任务)
关于swift - 如何在 Swift 中使用类别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25250778/