我尝试在类中定义简单的私有方法和属性,但它给了我:
Duplicate interface definition for class 'FBViewController'
这是 .m 文件:
#import "FBAppDelegate.h"
#import "FBViewController.h"
#import<FacebookSDK/FacebookSDK.h>
#import "FBLoginViewController.h"
@interface FBAppDelegate()
@property (strong,nonatomic) UINavigationController *navController;
@property (strong, nonatomic) FBViewController *mainController;
-(void) showLoginView;
@end
@implementation FBAppDelegate
@synthesize navController = _navController,
mainController =_mainController;
...
...
@end
这是 *.h 文件:
#import <UIKit/UIKit.h>
@interface FBAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
UPDATE
添加了导入文件
*已解决 *
在 FacebookSDK 中已经有 FBViewController.h