diff --git a/ALCameraViewController.podspec b/ALCameraViewController.podspec index 8955b4e5..7b5ae63e 100644 --- a/ALCameraViewController.podspec +++ b/ALCameraViewController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "ALCameraViewController" - spec.version = "1.2.2" + spec.version = "1.2.3" spec.summary = "A camera view controller with custom image picker and image cropping. Written in Swift." spec.source = { :git => "https://github.com/AlexLittlejohn/ALCameraViewController.git", :tag => spec.version.to_s } spec.requires_arc = true diff --git a/ALCameraViewController/Utilities/CameraGlobals.swift b/ALCameraViewController/Utilities/CameraGlobals.swift index ebba811d..70764a52 100644 --- a/ALCameraViewController/Utilities/CameraGlobals.swift +++ b/ALCameraViewController/Utilities/CameraGlobals.swift @@ -7,6 +7,7 @@ // import UIKit +import AVFoundation internal let itemSpacing: CGFloat = 1 internal let columns: CGFloat = 4 @@ -16,7 +17,8 @@ internal let scale = UIScreen.mainScreen().scale public class CameraGlobals { public static let shared = CameraGlobals() - var bundle = NSBundle(forClass: CameraViewController.self) - var stringsTable = "CameraView" - var photoLibraryThumbnailSize = CGSizeMake(thumbnailDimension, thumbnailDimension) + public var bundle = NSBundle(forClass: CameraViewController.self) + public var stringsTable = "CameraView" + public var photoLibraryThumbnailSize = CGSizeMake(thumbnailDimension, thumbnailDimension) + public var defaultCameraPosition = AVCaptureDevicePosition.Back } diff --git a/ALCameraViewController/Views/CameraView.swift b/ALCameraViewController/Views/CameraView.swift index 8a88a21a..fe265e14 100644 --- a/ALCameraViewController/Views/CameraView.swift +++ b/ALCameraViewController/Views/CameraView.swift @@ -21,7 +21,7 @@ public class CameraView: UIView { let focusView = CropOverlay(frame: CGRect(x: 0, y: 0, width: 80, height: 80)) - public var currentPosition = AVCaptureDevicePosition.Back + public var currentPosition = CameraGlobals.shared.defaultCameraPosition public func startSession() { dispatch_async(cameraQueue) {