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

Commit 731ae25

Browse files
Merge branch 'release/2.0.2'
2 parents 502ef25 + 2b6817f commit 731ae25

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

ALCameraViewController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "ALCameraViewController"
3-
spec.version = "2.0.1"
3+
spec.version = "2.0.2"
44
spec.summary = "A camera view controller with custom image picker and image cropping."
55
spec.source = { :git => "https://github.com/AlexLittlejohn/ALCameraViewController.git", :tag => spec.version.to_s }
66
spec.requires_arc = true

ALCameraViewController/ViewController/CameraViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ open class CameraViewController: UIViewController {
284284
cameraView.startSession()
285285
addCameraObserver()
286286
addRotateObserver()
287-
rotateCameraView()
288287

289288
if allowVolumeButtonCapture {
290289
setupVolumeControl()

ALCameraViewController/Views/CameraView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public class CameraView: UIView {
5959
session.startRunning()
6060
DispatchQueue.main.async() { [weak self] in
6161
self?.createPreview()
62+
self?.rotatePreview()
6263
}
6364
}
6465
}

ALCameraViewController/Views/CropOverlay.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,17 @@ internal class CropOverlay: UIView {
199199
}
200200
}
201201
}
202+
203+
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
204+
let view = super.hitTest(point, with: event)
205+
206+
if !isMovable && isResizable && view != nil {
207+
let isButton = cornerButtons.reduce(false) { $1.hitTest(convert(point, to: $1), with: event) != nil || $0 }
208+
if !isButton {
209+
return nil
210+
}
211+
}
212+
213+
return view
214+
}
202215
}

0 commit comments

Comments
 (0)