FlowCastv
FlowCastv

Reputation: 147

Unknown types name UIBezierPath

I plan to make a QRBar scanner, I found a source called "IOS7_BarcodeScanner" which implement the any types of scanner to be used. I try the demo sources, and it works like a charm. But when I comes to creating my own project, and implement it. Unknown types name UIBezierPath, even I copy and paste exactly the files from demo source. It doesn't work. I have import the frameworks accordingly.

Barcode.h

#import <Foundation/Foundation.h>
@import AVFoundation;

@interface Barcode : NSObject 


+ (Barcode * )processMetadataObject:(AVMetadataMachineReadableCodeObject*) code;
- (NSString *) getBarcodeType;
- (NSString *) getBarcodeData;
- (void) printBarcodeData;
@end

Barcode.m

#import "Barcode.h"

@interface Barcode()
@property (nonatomic, strong) UIBezierPath *cornersPath;
@end

@implementation Barcode

@end

Error

@property (nonatomic, strong) UIBezierPath *cornersPath;

Message

Unknown type name 'UIBezierPath' Property with 'retain (or strong)' attribute must be of object type'

Upvotes: 0

Views: 438

Answers (2)

Nilesh Patel
Nilesh Patel

Reputation: 6394

Import UIKit framework

Objective-C :

#import <UIKit/UIKit.h> OR @import UIKit;

Swift

   import UIKit

Upvotes: 3

Dave Batton
Dave Batton

Reputation: 8835

Try adding this at the top of your .h file:

#import <UIKit/UIKit.h>

Upvotes: 0

Related Questions