继承启动UIImagePickerController的方法:
- (IBAction)startScan:(id)sender {
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.readerView.torchMode = 1;
ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:0];
[self presentModalViewController:reader animated:YES];
reader = nil;
resultTextView.hidden = NO;
}
但是在选择图像时,不会调用委托方法 - imagePickerController:didFinishPickingMediaWithInfo:。有谁能说出原因?