我正在使用后置摄像头来读取条形码数据...它正在完美扫描.现在我想使用前置摄像头......我该怎么做?我应该在哪里进行更改?我使用过ZBar条形码阅读器
我的代码是:
- (IBAction) scanButtonTapped
{
// ADD: present a barcode reader that scans from the camera feed
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
// TODO: (optional) additional reader configuration here
// EXAMPLE: disable rarely used I2/5 to improve performance
[scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
// present and release the controller
[self presentModalViewController: reader
animated: YES];
[reader release];
}
- (void) imagePickerController: (UIImagePickerController*) reader
didFinishPickingMediaWithInfo: (NSDictionary*) info
{
// …Run Code Online (Sandbox Code Playgroud) 当我按下RETURN键时,我想解雇我的键盘.
我试过把按钮放在视图的背面.
但是如何通过按RETURN键来完成此操作?