forked from WeTransfer/WeScan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request WeTransfer#165 from konciergeMD/Yang/FixTheOrienta…
…tion Camera Roll support + camera capturing optimization + Added a Cancel Button in Edit Image VC
- Loading branch information
Showing
8 changed files
with
83 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// CGImagePropertyOrientation.swift | ||
// WeScan | ||
// | ||
// Created by Yang Chen on 5/21/19. | ||
// Copyright © 2019 WeTransfer. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
extension CGImagePropertyOrientation { | ||
init(_ uiOrientation: UIImage.Orientation) { | ||
switch uiOrientation { | ||
case .up: | ||
self = .up | ||
case .upMirrored: | ||
self = .upMirrored | ||
case .down: | ||
self = .down | ||
case .downMirrored: | ||
self = .downMirrored | ||
case .left: | ||
self = .left | ||
case .leftMirrored: | ||
self = .leftMirrored | ||
case .right: | ||
self = .right | ||
case .rightMirrored: | ||
self = .rightMirrored | ||
@unknown default: | ||
assertionFailure("Unknow orientation, falling to default") | ||
self = .right | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters