Git Product home page Git Product logo

scancode's Introduction

ScanDemo

生成二维码,可添加中心logo图。
支持识别二维码、条形码DM码等,具体可以查看sdk。
适配iOS10,info.plist文件添加相机权限Privacy - Camera Usage Description

主要文件

  • CLScanCodeManeger 二维码识别类
  • UIImage+CLQRCode 二维码生成类
  • CLScanAnimationView 扫描框视图类

使用方法 在ViewController.m实现

1.包含头文件

#import "CLScanCodeManeger.h"

2.设置扫描区域,设置加载图层

// 设置扫描识别区域(不是必要操作)
[[CLScanCodeManeger manager] setRecognitionAreaRect:self.scanView.frame];

// 显示预览(必要操作)
[[CLScanCodeManeger manager] loadWithView:self.view resultHandler:^(NSString * _Nonnull result) {
    // 可以执行跳转到指定页了
    
}];

3.开始和停止扫描

- (void)viewWillAppear:(BOOL)animated {
  [super viewWillAppear:animated];
  // 开始扫描
  [[CLScanCodeManeger manager] startScan];
}

- (void)viewWillDisappear:(BOOL)animated {
  [super viewWillDisappear:animated];
  // 停止扫描
  [[CLScanCodeManeger manager] stopScan];
}

scancode's People

Contributors

carrysniper avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.