聲明我創建了一個協議找不到協議聲明時協議在它自己的.h文件中
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
// Defines the protocol that must be implemented to be a delegate for UCMapviewController
@protocol UCMapviewDelegate <NSObject>
@required
- (void)pushMapviewRight;
@end
當我去到新的文件 - >協議,有一個提示,詢問目標。我檢查我的項目。但是當我單擊我的項目中的protocol.h文件並查看文件檢查器時,在「目標成員」中,我的項目未選中,我無法檢查它。
當我把協議在我viewControllers之一(例如)的頭文件我沒有得到這個錯誤。我必須在其他地方導入協議嗎?
什麼是錯的?非常感謝幫助! THX
http://stackoverflow.com/questions/7661334/why-are-the-targets-memberships-checkboxes-disabled-for-all-files – jajo87