小编Khu*_*hah的帖子

如何在ipod中使用前置摄像头进行条码扫描

我正在使用后置摄像头来读取条形码数据...它正在完美扫描.现在我想使用前置摄像头......我该怎么做?我应该在哪里进行更改?我使用过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)

iphone camera ipod objective-c barcode-scanner

6
推荐指数
1
解决办法
4121
查看次数

如何在Enter键上关闭键盘

当我按下RETURN键时,我想解雇我的键盘.

我试过把按钮放在视图的背面.

但是如何通过按RETURN键来完成此操作?

iphone keyboard enter objective-c ios

2
推荐指数
1
解决办法
5557
查看次数

标签 统计

iphone ×2

objective-c ×2

barcode-scanner ×1

camera ×1

enter ×1

ios ×1

ipod ×1

keyboard ×1