2013-09-21 70 views
-1

我在Xcode Project中有多個協議,它會給出這樣的錯誤。幫我 錯誤像: - >找不到'ButtonDelegate'的協議聲明你的意思是'CustomDelegate'? 由於提前Image找不到'xxxxx'的協議聲明;你的意思是'yyyyy'

委託頭文件

#import <UIKit/UIKit.h> 
#import "Constant.h" 

@protocol ButtonDelegate <NSObject> 
-(void)ChatButtonClicked; 
@end 

@interface DonttreadonmeCell : UITableViewCell<UIGestureRecognizerDelegate,UITextViewDelegate>{ 

id <ButtonDelegate> Buttondelegate; 

.h File 

#import <UIKit/UIKit.h> 
#import <Twitter/Twitter.h> 
#import "JSONParsing.h" 
#import "Facebook.h" 
#import "DonttreadonmeCell.h" 
#import "Constant.h" 



@class DonttreadonmeCell; 

    @interface BookTextPeregraphselectedViewController : UIViewController<MFMailComposeViewControllerDelegate,FBSessionDelegate,FBRequestDelegate,ButtonDelegate,FBLoginDialogDelegate,FBDialogDelegate,JSONParsingDelegate,UITableViewDataSource,UITableViewDelegate,UIGestureRecognizerDelegate,UITextViewDelegate>{ 
+0

我看不懂。發佈文字。 – 2013-09-21 05:19:08

+1

@ H2CO3錯誤:無法找到'ButtonDelegate'的協議聲明你的意思是'CustomDelegate' –

+0

你是否在導入協議聲明的.h文件? –

回答

4

我宣佈導入文件的頂部我的協議聲明部分...它的工作感謝上帝。

@protocol ButtonDelegate <NSObject> 
-(void)ChatButtonClicked; 
@end 


#import <UIKit/UIKit.h> 
#import "Constant.h" 

像這樣

+0

非常感謝你@Jig Patel – pechar

+0

出於某種原因 - 這工作。謝謝! – Tander

1

包括與特定遺漏協議的頭文件。 在我的情況下,它是MFMailComposeViewControllerDelegate。我加了

#import <MessageUI/MessageUI.h> 

問題修正了。

相關問題