【发布时间】:2015-05-28 23:34:04
【问题描述】:
在一个已经有 ObjC 的项目中,我正在添加一个 Swift 类
import AddressBookUI
class MyVC : UITableViewController, ABPeoplePickerNavigationControllerDelegate {
}
MyApp-Swift.h:289:42:找不到“ABPeoplePickerNavigationControllerDelegate”的协议声明;你的意思是“UINavigationControllerDelegate”吗?
不,斯威夫特,我的意思是ABPeoplePickerNavigationControllerDelegate。真的想知道我在这里做错了什么......
【问题讨论】:
-
你认为我没有?自 2008 年以来我一直在使用 AB 框架......在 Swift 中有点不同——它可能与 AB 无关,但通常我不理解 Swift/ObjC 的某些内容。
-
只需导入一个快速文件名 MyVC 并使用上面的代码,不要将上面的代码放在头文件中。
标签: ios swift delegates addressbook peoplepicker