VTCameraPreviewView 0.1.3

VTCameraPreviewView 0.1.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jun 2016
SPMSupports SPM

Maintained by Vien Vu.



  • By
  • Vien Vu

VTCameraPreviewView

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Xcode 7 and iOS 8 Above

Installation

VTCameraPreviewView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'VTCameraPreviewView'

Remember use

use_frameworks!

when you use pod swift.

Usage

You can put view from xib and make class is this class. And set camera isFront = yes or no . Done!

Or

import VTCameraPreviewView

.
.
.


override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.



    self.preview = VTCameraPreviewView(isFront: true)
}



override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()

     self.preview.frame = self.view.bounds
      self.view.addSubview(preiview)
}

And you can change camera by one line:

    self.preview.switchCamera()

Author

Vien Vu

License

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