ios - 未知类型名称 UIBezierPath

标签 ios objective-c iphone uibezierpath

我打算制作一个 QRBar 扫描仪,我找到了一个名为“IOS7_BarcodeScanner”的源代码,它实现了要使用的任何类型的扫描仪。我尝试了演示源,它就像一个魅力。但是当我开始创建自己的项目并实现它时。未知类型名称 UIBezierPath,甚至我从演示源中复制并粘贴文件。它不起作用。我已经相应地导入了框架。

条码.h

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

@interface Barcode : NSObject 


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

条码.m

#import "Barcode.h"

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

@implementation Barcode

@end

错误

@property (nonatomic, strong) UIBezierPath *cornersPath;

留言

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

最佳答案

导入 UIKit 框架

objective-C :

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

swift

   import UIKit

关于ios - 未知类型名称 UIBezierPath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30701360/

相关文章:

ios - Swift 错误访问代码 = 2

ios - 等待在 UITabBarController 中加载 subview ?

ios - ReadRSSI 不调用委托(delegate)方法

iphone - 如何通过 Sql 查询获取 Sqlite 中表的最后/底行

ios - React Native iOS 应用程序在重启时重新启动

iphone - 如何布局项目 "relatively"而不是绝对位置?

ios - Objective C 框架动画

ios - AFNetworking 中的错误响应解析

ios - 使用 AVAudioPlayer 更改音高

ios - 如何在我的 iPad 应用程序中打开 .IBA 文件