1. <tfoot id='mVgDn'></tfoot>

        <bdo id='mVgDn'></bdo><ul id='mVgDn'></ul>

    2. <i id='mVgDn'><tr id='mVgDn'><dt id='mVgDn'><q id='mVgDn'><span id='mVgDn'><b id='mVgDn'><form id='mVgDn'><ins id='mVgDn'></ins><ul id='mVgDn'></ul><sub id='mVgDn'></sub></form><legend id='mVgDn'></legend><bdo id='mVgDn'><pre id='mVgDn'><center id='mVgDn'></center></pre></bdo></b><th id='mVgDn'></th></span></q></dt></tr></i><div id='mVgDn'><tfoot id='mVgDn'></tfoot><dl id='mVgDn'><fieldset id='mVgDn'></fieldset></dl></div>
      <legend id='mVgDn'><style id='mVgDn'><dir id='mVgDn'><q id='mVgDn'></q></dir></style></legend>
    3. <small id='mVgDn'></small><noframes id='mVgDn'>

        在 cocos2d 引擎中实现二维码阅读器

        时间:2024-08-12

        <small id='uuOqC'></small><noframes id='uuOqC'>

        1. <legend id='uuOqC'><style id='uuOqC'><dir id='uuOqC'><q id='uuOqC'></q></dir></style></legend>
        2. <tfoot id='uuOqC'></tfoot>
        3. <i id='uuOqC'><tr id='uuOqC'><dt id='uuOqC'><q id='uuOqC'><span id='uuOqC'><b id='uuOqC'><form id='uuOqC'><ins id='uuOqC'></ins><ul id='uuOqC'></ul><sub id='uuOqC'></sub></form><legend id='uuOqC'></legend><bdo id='uuOqC'><pre id='uuOqC'><center id='uuOqC'></center></pre></bdo></b><th id='uuOqC'></th></span></q></dt></tr></i><div id='uuOqC'><tfoot id='uuOqC'></tfoot><dl id='uuOqC'><fieldset id='uuOqC'></fieldset></dl></div>
                <tbody id='uuOqC'></tbody>
                <bdo id='uuOqC'></bdo><ul id='uuOqC'></ul>
                • 本文介绍了在 cocos2d 引擎中实现二维码阅读器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  到目前为止,我正在使用 cocos2d 引擎创建一个游戏,并且我想实现一个二维码阅读器.

                  So far I am using the cocos2d engine to create a game and I want to implement a QR reader.

                  到目前为止,我已经创建了一个 CCScene,CCScene 有一个菜单按钮,它会导致一个 onScan 方法:

                  So far I've created a CCScene, the CCScene has a menu button and it leads to a onScan Method:

                  -(void) onScan:(id)sender{
                      // ADD: present a barcode reader that scans from the camera feed
                      ZBarReaderViewController *reader = [ZBarReaderViewController new];
                      reader.readerDelegate = self;
                  
                      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];
                  }
                  

                  我知道这适用于标准 ViewController 类,但我想知道如何最好地实现它以与我的 CCScene 上的 cocos2d 引擎一起工作

                  I understand that this works on a standard ViewController class but I am wondering how to best implement this to work with the cocos2d engine on my CCScene

                  任何帮助将不胜感激谢谢!

                  Any help would be appreciated Thanks!

                  推荐答案

                  UIView* glView = [CCDirector sharedDirector].view;
                  UIView* window = glView.superview;
                  
                  [window addSubview:reader.view];
                  

                  这篇关于在 cocos2d 引擎中实现二维码阅读器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 MPMoviePlayerController 中播放 mov 文件时出现问题 下一篇:Objective C - XCode无法识别if语句之外的变量

                  相关文章

                    <bdo id='uxrn9'></bdo><ul id='uxrn9'></ul>

                  <tfoot id='uxrn9'></tfoot>
                  <legend id='uxrn9'><style id='uxrn9'><dir id='uxrn9'><q id='uxrn9'></q></dir></style></legend>

                  <small id='uxrn9'></small><noframes id='uxrn9'>

                      <i id='uxrn9'><tr id='uxrn9'><dt id='uxrn9'><q id='uxrn9'><span id='uxrn9'><b id='uxrn9'><form id='uxrn9'><ins id='uxrn9'></ins><ul id='uxrn9'></ul><sub id='uxrn9'></sub></form><legend id='uxrn9'></legend><bdo id='uxrn9'><pre id='uxrn9'><center id='uxrn9'></center></pre></bdo></b><th id='uxrn9'></th></span></q></dt></tr></i><div id='uxrn9'><tfoot id='uxrn9'></tfoot><dl id='uxrn9'><fieldset id='uxrn9'></fieldset></dl></div>