All Projects → charlymr → Irldocumentscanner

charlymr / Irldocumentscanner

Licence: mit
A drop-in Objective-C ViewController that will Automatically scan a document for you you.

Projects that are alternatives of or similar to Irldocumentscanner

Pluggableappdelegate
!! No longer supported !! A lightweight service-oriented AppDelegate for iOS, made in Swift.
Stars: ✭ 96 (-44.19%)
Mutual labels:  xcode, cocoapods, carthage
Alamofire
Elegant HTTP Networking in Swift
Stars: ✭ 36,896 (+21351.16%)
Mutual labels:  xcode, cocoapods, carthage
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+795.35%)
Mutual labels:  xcode, cocoapods, carthage
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-59.88%)
Mutual labels:  xcode, cocoapods, carthage
Sqift
Powerful Swift wrapper for SQLite
Stars: ✭ 119 (-30.81%)
Mutual labels:  xcode, cocoapods, carthage
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+586.05%)
Mutual labels:  xcode, cocoapods, carthage
Cdmarkdownkit
An extensive Swift framework providing simple and customizable markdown parsing.
Stars: ✭ 158 (-8.14%)
Mutual labels:  xcode, cocoapods, carthage
Swiftymessenger
Swift toolkit for passing messages between iOS apps and extensions.
Stars: ✭ 48 (-72.09%)
Mutual labels:  xcode, cocoapods, carthage
Microfeatures Example
📦📱 Example of iOS app built using the uFeatures architecture
Stars: ✭ 112 (-34.88%)
Mutual labels:  xcode, cocoapods, carthage
Shari
Shari is the alternative to the library of UIPickerView(drum roll) in Swift. You can select a item using UITableView.
Stars: ✭ 111 (-35.47%)
Mutual labels:  xcode, cocoapods, carthage
Cameramanager
Simple Swift class to provide all the configurations you need to create custom camera view in your app
Stars: ✭ 1,130 (+556.98%)
Mutual labels:  camera, cocoapods, carthage
Natrium
A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
Stars: ✭ 131 (-23.84%)
Mutual labels:  xcode, cocoapods, carthage
Mtbbarcodescanner
A lightweight, easy-to-use barcode scanning library for iOS 8+
Stars: ✭ 1,085 (+530.81%)
Mutual labels:  camera, cocoapods, carthage
Xmlmapper
A simple way to map XML to Objects written in Swift
Stars: ✭ 90 (-47.67%)
Mutual labels:  xcode, cocoapods, carthage
Luautocompleteview
Highly configurable autocomplete view that is attachable to any UITextField
Stars: ✭ 55 (-68.02%)
Mutual labels:  xcode, cocoapods, carthage
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+6124.42%)
Mutual labels:  xcode, cocoapods, carthage
Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (+459.88%)
Mutual labels:  xcode, cocoapods, carthage
Swiftysound
SwiftySound is a simple library that lets you play sounds with a single line of code.
Stars: ✭ 995 (+478.49%)
Mutual labels:  xcode, cocoapods, carthage
Device
Light weight tool for detecting the current device and screen size written in swift.
Stars: ✭ 1,503 (+773.84%)
Mutual labels:  xcode, cocoapods, carthage
Croc
Swift emoji string parsing library
Stars: ✭ 124 (-27.91%)
Mutual labels:  xcode, cocoapods, carthage

Demo

IRLDocumentScanner

IRLDocumentScanner is an Objective-C ViewController that will Automatically scan a document for you. MINIMUM iOS REQUIREMENT: 8.0

Build StatusVersionCarthage compatiblePlatform

Screenshot

Application plist requirement (iOS 10+)

As of iOS 10, you must povide a reason for using the camera in you plist: Please add the following to your plist: NSCameraUsageDescription : We need the camera to scan

Installation

The recommended approach for installing IRLDocumentScanner is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation. For best results, it is recommended that you install via CocoaPods >= 1.0 using Git >= 1.8.0 installed via Homebrew.

via CocoaPods

Install CocoaPods if not already available:

$ [sudo] gem install cocoapods
$ pod setup

Change to the directory of your Xcode project, and Create and Edit your Podfile and add IRLDocumentScanner:

$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile

platform :ios, '8.0'

target "YOUR APP" do
pod 'IRLDocumentScanner'
use_frameworks!
end

via Carthage

Install Carthage if not already available

Change to the directory of your Xcode project, and Create and Edit your Podfile and add IRLDocumentScanner:

$ cd /path/to/MyProject
$ touch CartFile
$ edit CartFile

github "charlymr/IRLDocumentScanner" ~> 0.3.1

Save and run:

$ carthage update

Drop the Carthage/Build/iOS .framework in your project.

For more details on Cartage and how to use it, check the Carthage Github documentation

Manually

  • Download IRLDocumentScanner
  • Copy to your project those 2 files: IRLCamera.storyboard | IRLCameraMedia.xcassets
  • Copy to your project this folder: Source
  • Make sure your project link to 'Foundation', 'UIKit', 'AVFoundation', 'CoreImage', 'GLKit'
  • Download TOCropViewController
  • Add it to TOCropViewController your project

Getting Started

IRLDocumentScanner is designed to be a standalone drop in dependency. You instantiate the controller, defining its delegate and present it.

Examples

Objective-C

#pragma mark - User Actions

- (IBAction)scan:(id)sender {
    IRLScannerViewController *scanner = [IRLScannerViewController standardCameraViewWithDelegate:self];
        scanner.showCountrols = YES;
        scanner.showAutoFocusWhiteRectangle = YES;
        [self presentViewController:scanner animated:YES completion:nil];
}

#pragma mark - IRLScannerViewControllerDelegate

-(void)pageSnapped:(UIImage *)page_image from:(UIViewController *)controller {
    [controller dismissViewControllerAnimated:YES completion:^{
        [self.scannedImage setImage:page_image];
    }];
}

-(void)didCancelIRLScannerViewController:(IRLScannerViewController *)cameraView {
    [cameraView dismissViewControllerAnimated:YES completion:nil];
}

Swift

   // MARK: User Actions

    @IBAction func scan(sender: AnyObject) {
        let scanner = IRLScannerViewController.standardCameraViewWithDelegate(self)
        scanner.showControls = true
        scanner.showAutoFocusWhiteRectangle = true
        presentViewController(scanner, animated: true, completion: nil)
    }
    
    // MARK: IRLScannerViewControllerDelegate
    
    func pageSnapped(page_image: UIImage!, from controller: IRLScannerViewController!) {
        controller.dismissViewControllerAnimated(true) { () -> Void in
            self.imageView.image = page_image
        }
    }
    
    func didCancel(_ cameraView: IRLScannerViewController) {
        cameraView.dismissViewControllerAnimated(true) {}
    }

Authors

Attribution

Open Source

  • Feel free to fork and modify this code. Pull requests are more than welcome!

License

The MIT License (MIT)

Copyright (c) 2015 Denis Martin. Part of this code where taken from IPDFCameraViewController

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].