我正在尝试将Zbar sdk集成到我收到此错误。
"+[QRCodeReadViewController presentViewController:animated:]: unrecognized selector sent to class 0x865c74";
提前致谢
我的代码是
+(void)startfn{
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate =self;
ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
[self presentViewController:reader animated:NO];
[reader release];
}
答案 0 :(得分:1)
不是startfn
类方法吗?在这种情况下,self
引用类QRCodeReadViewController
而不引用该类的实例,因此您无法调用presentViewController:animated:completion:
这是UIViewController
实例的方法