Skip to content

Commit 4add829

Browse files
committed
Merge branch 'develop'
2 parents 1b158af + 4e066b1 commit 4add829

File tree

9 files changed

+25
-21
lines changed

9 files changed

+25
-21
lines changed

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "Quick/Nimble" "v8.0.7"
2-
github "TimOliver/TOCropViewController" "2.5.2"
2+
github "TimOliver/TOCropViewController" "2.5.3"

MediaEditor.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'MediaEditor'
3-
s.version = '1.1.0'
3+
s.version = '1.2.0'
44
s.summary = 'An extensible Media Editor for iOS.'
55

66
s.description = <<-DESC
@@ -22,5 +22,5 @@ Pod::Spec.new do |s|
2222
'MediaEditor' => 'Sources/**/*.{xcassets}'
2323
}
2424

25-
s.dependency 'TOCropViewController', '~> 2.5.2'
25+
s.dependency 'CropViewController', '~> 2.5.3'
2626
end

MediaEditor.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
8B5046AC23D7C9AD00068F66 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
126126
8B5046AF23D7C9AD00068F66 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
127127
8B5046B123D7C9AD00068F66 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
128-
8B5046B723D7CCBD00068F66 /* TOCropViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TOCropViewController.framework; path = Carthage/Build/iOS/TOCropViewController.framework; sourceTree = "<group>"; };
128+
8B5046B723D7CCBD00068F66 /* CropViewController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CropViewController.framework; path = Carthage/Build/iOS/CropViewController.framework; sourceTree = "<group>"; };
129129
8B5046C423D7CE1600068F66 /* UIImage+AsyncImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+AsyncImage.swift"; sourceTree = "<group>"; };
130130
8B5046C523D7CE1600068F66 /* PHAsset+AsyncImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PHAsset+AsyncImage.swift"; sourceTree = "<group>"; };
131131
8B5046C623D7CE1600068F66 /* MediaEditor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaEditor.swift; sourceTree = "<group>"; };
@@ -156,15 +156,15 @@
156156
isa = PBXFrameworksBuildPhase;
157157
buildActionMask = 2147483647;
158158
files = (
159-
8B5046BB23D7CCD000068F66 /* TOCropViewController.framework in Frameworks */,
159+
8B5046BB23D7CCD000068F66 /* CropViewController.framework in Frameworks */,
160160
);
161161
runOnlyForDeploymentPostprocessing = 0;
162162
};
163163
8B50469E23D7C9AC00068F66 /* Frameworks */ = {
164164
isa = PBXFrameworksBuildPhase;
165165
buildActionMask = 2147483647;
166166
files = (
167-
8B5046B823D7CCBD00068F66 /* TOCropViewController.framework in Frameworks */,
167+
8B5046B823D7CCBD00068F66 /* CropViewController.framework in Frameworks */,
168168
8B5046B623D7C9E300068F66 /* MediaEditor.framework in Frameworks */,
169169
);
170170
runOnlyForDeploymentPostprocessing = 0;
@@ -346,7 +346,7 @@
346346
isa = PBXGroup;
347347
children = (
348348
8B5046FC23D7D16A00068F66 /* Nimble.framework */,
349-
8B5046B723D7CCBD00068F66 /* TOCropViewController.framework */,
349+
8B5046B723D7CCBD00068F66 /* CropViewController.framework */,
350350
);
351351
name = Frameworks;
352352
sourceTree = "<group>";

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ github "wordpress-mobile/MediaEditor-iOS"
7676

7777
2. Run `carthage update`
7878

79-
3. From the `Carthage/Build` folder, import `MediaEditor.framework` and `TOCropViewController.framework` into your Xcode project.
79+
3. From the `Carthage/Build` folder, import `MediaEditor.framework` and `CropViewController.framework` into your Xcode project.
8080

8181
4. Follow the remaining steps on [Getting Started with Carthage](https://github.com/Carthage/Carthage#getting-started) to finish integrating the framework.
8282

RELEASE-NOTES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.2.0
2+
-----
3+
* Replace TOCropViewController with CropViewController
4+
15
1.1.0
26
-----
37
* Add Drawing capability using PencilKit

Sources/Capabilities/Crop/MediaEditorCropZoomRotate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import UIKit
2-
import TOCropViewController
2+
import CropViewController
33

4-
typealias MediaEditorCropZoomRotate = TOCropViewController
4+
typealias MediaEditorCropZoomRotate = CropViewController
55

6-
extension TOCropViewController: MediaEditorCapability {
6+
extension CropViewController: MediaEditorCapability {
77
public static var name = "Crop, Zoom, Rotate"
88

99
public static var icon = UIImage(named: "gridicons-crop", in: .mediaEditor, compatibleWith: nil)!
1010

1111
public static func initialize(_ image: UIImage, onFinishEditing: @escaping (UIImage, [MediaEditorOperation]) -> (), onCancel: @escaping () -> ()) -> CapabilityViewController {
12-
let cropViewController = TOCropViewController(image: image)
12+
let cropViewController = CropViewController(image: image)
1313

1414
weak var toCrop = cropViewController
1515

Sources/Capabilities/Crop/TOCropViewController+Ext.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import TOCropViewController
1+
import CropViewController
22

3-
extension TOCropViewController {
4-
// TOCropViewController sometimes resize the image by 1, 2 or 3 points automatically.
3+
extension CropViewController {
4+
// CropViewController sometimes resize the image by 1, 2 or 3 points automatically.
55
// In those cases we're not considering that as a cropping action.
66
var isCropped: Bool {
77
return abs(imageSizeDiscardingRotation.width - image.size.width) > 4 ||

Tests/Capabilities/Crop/MediaEditorCropZoomRotateTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import XCTest
2-
import TOCropViewController
2+
import CropViewController
33
import Nimble
44

55
@testable import MediaEditor
@@ -17,7 +17,7 @@ class MediaEditorCropZoomRotateTests: XCTestCase {
1717
func testDoNotHideNavigation() {
1818
let mediaEditorCrop = MediaEditorCropZoomRotate.initialize(image, onFinishEditing: { _, _ in }, onCancel: {})
1919

20-
let viewController = mediaEditorCrop as? TOCropViewController
20+
let viewController = mediaEditorCrop as? CropViewController
2121

2222
expect(viewController?.hidesNavigationBar).to(beFalse())
2323
}
@@ -30,7 +30,7 @@ class MediaEditorCropZoomRotateTests: XCTestCase {
3030
onFinishEditingCalled = true
3131
},
3232
onCancel: {})
33-
let viewController = mediaEditorCrop as? TOCropViewController
33+
let viewController = mediaEditorCrop as? CropViewController
3434

3535
viewController?.onDidCropToRect?(image, .zero, 0)
3636

@@ -46,7 +46,7 @@ class MediaEditorCropZoomRotateTests: XCTestCase {
4646
onCancelCalled = true
4747
}
4848
)
49-
let viewController = mediaEditorCrop as? TOCropViewController
49+
let viewController = mediaEditorCrop as? CropViewController
5050

5151
viewController?.onDidFinishCancelled?(true)
5252

@@ -58,7 +58,7 @@ class MediaEditorCropZoomRotateTests: XCTestCase {
5858

5959
mediaEditorCrop.apply(styles: [.rotateCounterclockwiseButtonHidden: true])
6060

61-
let viewController = mediaEditorCrop as? TOCropViewController
61+
let viewController = mediaEditorCrop as? CropViewController
6262
expect(viewController?.toolbar.rotateCounterclockwiseButtonHidden).to(beTrue())
6363
}
6464

Tests/MediaEditorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import XCTest
2-
import TOCropViewController
2+
import CropViewController
33
import Nimble
44

55
@testable import MediaEditor

0 commit comments

Comments
 (0)