I have this code a Custom class which extends UIImageView
in Objective-C.
When I add to the project and add import to bridging header file my swift class can see and use the code as usual but when i try to compile it.
I always get this error
I don't know why it is only happen to my CarBigImageView
, I try to change the name of the file , create new file with new name and copy all the code there but none seem to work.
but other custom view such as Marker seem to be fine?
UPDATE : ADD MORE INFORMATION
here is my bridging header
#import <AFNetworking/AFNetworking.h>
#import <AFNetworking/UIImageView+AFNetworking.h>
#import <GSKeychain.h>
#import <JSONKit.h>
#import "CarBigImageView.h"
#import "sqlite3.h"
#import <time.h>
#import "Bridge.h"
#import "Marker.h"
here is my "CarBigImageView.h"
#import <UIKit/UIKit.h>
@protocol CarBigImageViewDelegate <NSObject>
- (void)didTouchColor:(UIColor*)coloc atPosition:(CGPoint)point;
@end
@interface CarBigImageView : UIImageView
@property (weak, nonatomic) id<CarBigImageViewDelegate> delegate;
@end
and here what it looks in the editor
and the result when compile
How can i solve this?
Make sure you left Xcode know where to find that file: in build settings look for "Objective-C Bridging Header". The value for that field should be something similar to "$(SRCROOT)/path/to/your/Bridging-Header.h" If you fill this out and hit enter, it SRCROOT will expand, and you can check if that full path is correct path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With