Added changelog and updated README

This commit is contained in:
Andrew Walz 2017-01-06 12:10:35 -07:00
parent 1abe380628
commit bdb3ce48ab
3 changed files with 14 additions and 5 deletions

9
CHANGELOG.md Normal file
View file

@ -0,0 +1,9 @@
# CHANGELOG
## Version 1.2.0
- Enabling flash is now a boolean property rather than a function
- Flash for photos only flashes when photo is taken.
- Flash for videos enables the torch when video begins recording and disables flash when video finishes
- Fixed issue where **SwiftyCamDidChangeZoomLevel(zoomLevel:)** would be called from pinch gestures from front camera
- Minor bug fixes and enhancements

View file

@ -137,11 +137,11 @@ and in your viewDidLoad, assign the cameraDelegate to self:
## Flash
The flash(torch) can be enabled on the device by calling:
The flash(torch) can be enabled by changing the **flashEnabled** property:
toggleFlash()
flashEnabled = true
The flash will only be enabled if the current camera is the rear camera and will automatically if the camera switches or the View Controller is dismissed.
The flash will only be enabled if the current camera is the rear camera. For photos, the camera will flash much like the stock iOS camera. For video, the torch(flash) will enable for the duration of the video capture.
## Switching Camera

View file

@ -380,7 +380,7 @@ open class SwiftyCamViewController: UIViewController {
// Used for Tap to Focus
override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
guard tapToFocus == true, currentCamera == .rear else {
guard tapToFocus == true && currentCamera == .rear else {
// Ignore taps
return
}
@ -569,7 +569,7 @@ open class SwiftyCamViewController: UIViewController {
// Handle zoom gesture
@objc fileprivate func zoomGesture(pinch: UIPinchGestureRecognizer) {
guard pinchToZoom == true else {
guard pinchToZoom == true && self.currentCamera == .rear else {
//ignore pinch if pinchToZoom is set to false
return
}