找不到"FBLoginViewDelegate"的协议声明 [英] Cannot find protocol declaration for 'FBLoginViewDelegate'
问题描述
由于某种原因,尝试将FBLoginViewDelegate
协议包含到我的ViewController
接口中时出现错误Cannot find protocol declaration for 'FBLoginViewDelegate'
.
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
我对iOS开发很陌生,任何帮助将不胜感激!
I'm quite new to iOS development and any help would be greatly appreciated!
推荐答案
只需删除并添加添加的 FacbookSDK 和
just remove and add the add the FacbookSDK and
做到
#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
这篇关于找不到"FBLoginViewDelegate"的协议声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!