Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLittlejohn committed Sep 8, 2017
2 parents 502ef25 + 2b6817f commit 731ae25
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ALCameraViewController.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "ALCameraViewController"
spec.version = "2.0.1"
spec.version = "2.0.2"
spec.summary = "A camera view controller with custom image picker and image cropping."
spec.source = { :git => "https://github.com/AlexLittlejohn/ALCameraViewController.git", :tag => spec.version.to_s }
spec.requires_arc = true
Expand Down
Expand Up @@ -284,7 +284,6 @@ open class CameraViewController: UIViewController {
cameraView.startSession()
addCameraObserver()
addRotateObserver()
rotateCameraView()

if allowVolumeButtonCapture {
setupVolumeControl()
Expand Down
1 change: 1 addition & 0 deletions ALCameraViewController/Views/CameraView.swift
Expand Up @@ -59,6 +59,7 @@ public class CameraView: UIView {
session.startRunning()
DispatchQueue.main.async() { [weak self] in
self?.createPreview()
self?.rotatePreview()
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions ALCameraViewController/Views/CropOverlay.swift
Expand Up @@ -199,4 +199,17 @@ internal class CropOverlay: UIView {
}
}
}

override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
let view = super.hitTest(point, with: event)

if !isMovable && isResizable && view != nil {
let isButton = cornerButtons.reduce(false) { $1.hitTest(convert(point, to: $1), with: event) != nil || $0 }
if !isButton {
return nil
}
}

return view
}
}

0 comments on commit 731ae25

Please sign in to comment.