Coder Social home page Coder Social logo

santangeli / sobrcameraview-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from softwarebrauerei/sobrcameraview-ios

0.0 1.0 1.0 195 KB

A camera view for iOS with document edge detection like Scannable or InstaPDF

License: MIT License

Swift 97.32% Ruby 2.68%

sobrcameraview-ios's Introduction

SobrCameraView for iOS

A simple UIView-Subclass which enables border detection of documents. Based on IPDFCameraViewController of Maximilian Mackh, rewritten in Swift and added some enhancements.

Features

  • Live border detection
  • Flash / Torch
  • Image Filters for better scanning results
  • Easy to use with a simple API

Requirements

  • iOS 8.0+
  • Xcode 6.3

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

Embedded frameworks require a minimum deployment target of iOS 8.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate SobrCameraView into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'SobrCameraView'

Then, run the following command:

$ pod install

Usage

Using Storyboards

  1. Place a UIView into your UIViewController and set the custom class to SobrCameraView. Storyboard-Screenshot
  2. In your UIViewcontroller implement the following lines of code. (See MainViewController.swift in the Example App.)
    class MainViewController: UIViewController {
    	@IBOutlet weak var cameraView: SobrCameraView!
    
    	override func viewDidLoad() {
    	    super.viewDidLoad()
    	    self.cameraView.setupCameraView()
    	    self.cameraView.borderDetectionEnabled = true
    	}
    
    	override func viewDidAppear(animated: Bool) {
            super.viewDidAppear(animated)
            self.cameraView.start()
        }
    
        override func viewWillDisappear(animated: Bool) {
            super.viewWillDisappear(animated)
            self.cameraView.stop()
        }
    }
  3. Connect the outlet in your storyboard.
  4. Run the app on a device and you will see a camera picture on your screen.

For more usage details please have a look at the example project.

Authors

License

SobrCameraView is available under the MIT license. See the LICENSE file for more info.

sobrcameraview-ios's People

Contributors

katunch avatar

Watchers

Adriano Santangeli avatar

Forkers

marcosmacedobr

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.