IOS easy-to-use QR code scan and generate QR code three-party control Lfqrcode, flexible custom UI

Source: Internet
Author: User

The scanned control is a view, and the user simply needs to stick it in their own controller. Other UI users can add them at their own controller. The code is as follows

- (void) viewdidload {[Super viewdidload]; //Scan active area (i.e. transparent area within the box)CGRect Interestrect = CGRectMake ( -, (Self.view.frame.size.height-(Self.view.frame.size.width- +))/2.0f, Self.view.frame.size.width- +, Self.view.frame.size.width- +); //Scan Controls_scanview =[[Lfqrcodescanner alloc] InitWithFrame:self.view.bounds Rectofinterest:interestrect]; _scanview.imgline.image= [UIImage imagenamed:@" Line"]; _scanview.scanfilishblock= ^ (Avmetadatamachinereadablecodeobject *result) {NSLog (@"Scan Result:%@", Result.stringvalue);    }; [Self.view insertsubview:_scanview Atindex:0];//Place the scan view on the bottom}- (void) Viewwillappear: (BOOL) animated {[Super viewwillappear:animated]; [Self.scanview start];}- (void) Viewdiddisappear: (BOOL) animated {[Super viewdiddisappear:animated]; [Self.scanview stop];}

Source Address: Https://github.com/zhanglinfeng/LFQRCode

Support Cocoapods

Pod ' Lfqrcode ' (recommended)

IOS easy-to-use QR code scan and generate QR code three-party control Lfqrcode, flexible custom UI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.