在一個項目有已經ObjC,我加入了斯威夫特類無法找到「ABPeoplePickerNavigationControllerDelegate」
import AddressBookUI
class MyVC : UITableViewController, ABPeoplePickerNavigationControllerDelegate {
}
MyApp的-Swift.h協議聲明:289:42:找不到協議聲明「ABPeoplePickerNavigationControllerDelegate」 ;你的意思是'UINavigationControllerDelegate'?
不,斯威夫特,我的意思是ABPeoplePickerNavigationControllerDelegate
。真的不知道我在做什麼錯在這裏...
檢查這個https://developer.apple.com/library/ios/documentation/AddressBookUI/Reference/ABPeoplePickerNavigationControllerDelegate_Protocol/ – Ajumal 2015-03-25 10:42:11
你以爲我沒有?自2008年以來,我一直在使用AB框架...... Swift中的某些內容有點不同 - 它可能與AB無關,但通常我不明白Swift/ObjC中的某些內容。 – 2015-03-25 11:07:54
只需導入一個swift文件名稱MyVC,並使用上面的代碼,不要將上面的代碼放在頭文件中。 – 2015-03-25 11:15:04