二维码扫描组件 QRCodeReaderViewController

码农软件 · 软件分类 · 条形码/二维码 · 2019-10-08 06:14:00

软件介绍

QRCodeReaderViewController 是一个用于 iOS 7 的二维码扫描组件。

screenshot

使用方法:

- (IBAction)scanAction:(id)sender
{
  QRCodeReaderViewController *reader = [QRCodeReaderViewController new];
  reader.modalPresentationStyle      = UIModalPresentationFormSheet;

  // Using delegate methods
  reader.delegate                    = self;

  // Or by using blocks
  [reader setCompletionWithBlock:^(NSString *resultAsString) {
    [self dismissViewControllerAnimated:YES completion:^{
      NSLog(@"%@", result);
    }];
  }];

  [self presentViewController:reader animated:YES completion:NULL];
}

#pragma mark - QRCodeReader Delegate Methods

- (void)reader:(QRCodeReaderViewController *)reader didScanResult:(NSString *)result
{
  [self dismissViewControllerAnimated:YES completion:^{
    NSLog(@"%@", result);
  }];
}

- (void)readerDidCancel:(QRCodeReaderViewController *)reader
{
  [self dismissViewControllerAnimated:YES completion:NULL];
}

本文地址:https://codercto.com/soft/d/16277.html

PHP Hacks

PHP Hacks

Jack Herrington D. / O'Reilly Media / 2005-12-19 / USD 29.95

Programmers love its flexibility and speed; designers love its accessibility and convenience. When it comes to creating web sites, the PHP scripting language is truly a red-hot property. In fact, PH......一起来看看 《PHP Hacks》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

URL 编码/解码
URL 编码/解码

URL 编码/解码