Cannot find protocol declaration for 'FBLoginViewDelegate'

不想你离开。 提交于 2019-12-11 07:46:41

问题


For some reason I'm getting the error Cannot find protocol declaration for 'FBLoginViewDelegate' when trying to include the FBLoginViewDelegate protocol to my ViewController interface.

I've searched for other similar questions but most of them seem to be related to circular inclusions...I don't think that's the case for me.

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController <UITextFieldDelegate, FBLoginViewDelegate>

//Properties    
@property (weak, nonatomic) IBOutlet UITextField *txtPassword;
@property (weak, nonatomic) IBOutlet UITextField *txtEmail;
@property (weak, nonatomic) IBOutlet UILabel *lblResult;

- (IBAction)loginClicked:(id)sender;
- (IBAction)backgroundTap:(id)sender;

@end

I'm quite new to iOS development and any help would be greatly appreciated!


回答1:


just remove and add the add the FacbookSDK and

make it

 #import<FacbookSDK/FaceBookSDK.h> in your VC.h file or .pch file (the compiler takes the Facebook delegate in all VC's)

finally clean and run your project, it surely works



来源:https://stackoverflow.com/questions/26418695/cannot-find-protocol-declaration-for-fbloginviewdelegate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!