2017-09-07 86 views
0

我有一个用Objective C编写的项目,新功能是用Swift 3.1写的 我的需求是访问在AppDelegate.h文件中声明的变量。所以我在我的桥文件中导入AppDelegate。现在我可以在Swift类文件中声明Appdelegate对象,并访问在Appdelegate中声明的变量。如何创建AppDelegate到第三方框架桥文件

问题是,在将AppDelegate导入Bridge文件后,AppDelegate.h文件中导入的框架出现错误。 “文件未找到” 如果我从桥文件中删除AppDelegate.h它的工作正常。

感谢您的帮助

#import <UIKit/UIKit.h> 
#import "DCPathButton.h" <- ERROR IN THIS FRAMEWORK 
#import <CoreLocation/CoreLocation.h> 



@interface AppDelegate : UIResponder <UIApplicationDelegate> 

@property (strong, nonatomic) UIWindow *window; 
@property NSInteger addUserFlag; 
@property NSInteger addDeviceFlag; 
@property NSInteger userProfileFlag; 
@property NSInteger backToAddHomeFlag; 
@property (strong, nonatomic) NSArray *loginResponseArray; 
@property NSInteger AcFlag; 
@property (strong,nonatomic) NSDictionary *FCM_Dict; 
@property (strong,nonatomic) NSString *supportPhone; 
@property (strong,nonatomic) NSString *FCM_Key; 
@property DCPathButton *dcPathButtonInAppDelgt; 
@property (strong,nonatomic) NSString *disableAddHomeBtn; 
@property (strong,nonatomic) NSString *disableAddRoomBtn; 
@property (strong,nonatomic) NSString *disableAddDeviceBtn; 
@property (strong,nonatomic) NSString *disableAddUserBtn; 
@property (strong,nonatomic) NSString *sideMenuFlag; 
@property (nonatomic, strong) CLLocationManager *locationManager; 
@property NSInteger homeOrAwayFlag; 
@end 

回答

1

移动#import "DCPathButton.h"您AppDelegate.m并添加这不是.H:@class DCPathButton;

+0

这是完美的作品。 –

相关问题