Skip to content

Commit

Permalink
Merge pull request #226 from ruslanskorb/develop
Browse files Browse the repository at this point in the history
Version 3.0.0
  • Loading branch information
ruslanskorb authored Oct 9, 2020
2 parents 571cf3d + 19c8bfd commit 075c1a6
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 315 deletions.
4 changes: 2 additions & 2 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '8.0'
platform :ios, '9.0'

inhibit_all_warnings!

Expand All @@ -13,7 +13,7 @@ target 'RSKImageCropperExampleTests' do
installer.pods_project.targets.each do |target|
if target.name == 'Expecta' || target.name == 'Specta' || target.name == 'FBSnapshotTestCase'
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DEPENDENCIES:
- Specta (= 1.0.7)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
https://github.com/CocoaPods/Specs.git:
- Expecta
- "Expecta+Snapshots"
- FBSnapshotTestCase
Expand All @@ -29,6 +29,6 @@ SPEC CHECKSUMS:
OCMock: ebe9ee1dca7fbed0ff9193ac0b3e2d8862ea56f6
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66

PODFILE CHECKSUM: b86b013bec210aa1f997028a5c25b96c1125fbd9
PODFILE CHECKSUM: 18474e83bf091eb6550572c22fb3534227bfa142

COCOAPODS: 1.5.3
COCOAPODS: 1.9.3
18 changes: 4 additions & 14 deletions Example/RSKImageCropperExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
B8182F2E1ABC998B00601E43 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B8182F2D1ABC998B00601E43 /* LaunchScreen.xib */; };
B82DF9C11AE27E81001F4ED2 /* RSKTouchViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B82DF9C01AE27E81001F4ED2 /* RSKTouchViewTests.m */; };
B82DF9C91AE2B28B001F4ED2 /* RSKImageCropViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B82DF9C81AE2B28B001F4ED2 /* RSKImageCropViewControllerTests.m */; };
B857871A1AE44E26004232F0 /* UIApplication+RSKImageCropperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B85787191AE44E26004232F0 /* UIApplication+RSKImageCropperTests.m */; };
B87A99F019A4D2CD00D12CD4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B87A99EF19A4D2CD00D12CD4 /* Foundation.framework */; };
B87A99F219A4D2CD00D12CD4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B87A99F119A4D2CD00D12CD4 /* CoreGraphics.framework */; };
B87A99F419A4D2CD00D12CD4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B87A99F319A4D2CD00D12CD4 /* UIKit.framework */; };
Expand All @@ -29,7 +28,6 @@
B87A9A2D19A4D39800D12CD4 /* RSKImageCropViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B87A9A2719A4D39800D12CD4 /* RSKImageCropViewController.m */; };
B87A9A2E19A4D39800D12CD4 /* RSKTouchView.m in Sources */ = {isa = PBXBuildFile; fileRef = B87A9A2919A4D39800D12CD4 /* RSKTouchView.m */; };
B87A9A2F19A4D39800D12CD4 /* UIImage+RSKImageCropper.m in Sources */ = {isa = PBXBuildFile; fileRef = B87A9A2B19A4D39800D12CD4 /* UIImage+RSKImageCropper.m */; };
B8B3824C1AC721A7004C55F0 /* UIApplication+RSKImageCropper.m in Sources */ = {isa = PBXBuildFile; fileRef = B8B3824B1AC721A7004C55F0 /* UIApplication+RSKImageCropper.m */; };
B8D73A841B9B1E22003AFA4A /* RSKImageCropperStrings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B8D73A831B9B1E22003AFA4A /* RSKImageCropperStrings.bundle */; };
B8D73A871B9B1E73003AFA4A /* RSKInternalUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = B8D73A861B9B1E73003AFA4A /* RSKInternalUtility.m */; };
B8F617661AE43CEF00499402 /* RSKImageCropperPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B8F617651AE43CEF00499402 /* RSKImageCropperPerformanceTests.m */; };
Expand All @@ -55,7 +53,6 @@
B82DF9BF1AE26DAD001F4ED2 /* RSKImageCropperExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RSKImageCropperExample-Prefix.pch"; sourceTree = "<group>"; };
B82DF9C01AE27E81001F4ED2 /* RSKTouchViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSKTouchViewTests.m; sourceTree = "<group>"; };
B82DF9C81AE2B28B001F4ED2 /* RSKImageCropViewControllerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSKImageCropViewControllerTests.m; sourceTree = "<group>"; };
B85787191AE44E26004232F0 /* UIApplication+RSKImageCropperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+RSKImageCropperTests.m"; sourceTree = "<group>"; };
B87A99EC19A4D2CD00D12CD4 /* RSKImageCropperExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RSKImageCropperExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
B87A99EF19A4D2CD00D12CD4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B87A99F119A4D2CD00D12CD4 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand All @@ -82,8 +79,6 @@
B87A9A2919A4D39800D12CD4 /* RSKTouchView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSKTouchView.m; sourceTree = "<group>"; };
B87A9A2A19A4D39800D12CD4 /* UIImage+RSKImageCropper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RSKImageCropper.h"; sourceTree = "<group>"; };
B87A9A2B19A4D39800D12CD4 /* UIImage+RSKImageCropper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RSKImageCropper.m"; sourceTree = "<group>"; };
B8B3824A1AC721A7004C55F0 /* UIApplication+RSKImageCropper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIApplication+RSKImageCropper.h"; sourceTree = "<group>"; };
B8B3824B1AC721A7004C55F0 /* UIApplication+RSKImageCropper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+RSKImageCropper.m"; sourceTree = "<group>"; };
B8D73A831B9B1E22003AFA4A /* RSKImageCropperStrings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = RSKImageCropperStrings.bundle; sourceTree = "<group>"; };
B8D73A851B9B1E73003AFA4A /* RSKInternalUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSKInternalUtility.h; sourceTree = "<group>"; };
B8D73A861B9B1E73003AFA4A /* RSKInternalUtility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSKInternalUtility.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -193,7 +188,6 @@
B8F617671AE4468000499402 /* RSKImageScrollViewTests.m */,
B82DF9C01AE27E81001F4ED2 /* RSKTouchViewTests.m */,
B87A9A0F19A4D2CD00D12CD4 /* Supporting Files */,
B85787191AE44E26004232F0 /* UIApplication+RSKImageCropperTests.m */,
);
path = RSKImageCropperExampleTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -232,8 +226,6 @@
B8D73A861B9B1E73003AFA4A /* RSKInternalUtility.m */,
B87A9A2819A4D39800D12CD4 /* RSKTouchView.h */,
B87A9A2919A4D39800D12CD4 /* RSKTouchView.m */,
B8B3824A1AC721A7004C55F0 /* UIApplication+RSKImageCropper.h */,
B8B3824B1AC721A7004C55F0 /* UIApplication+RSKImageCropper.m */,
B87A9A2A19A4D39800D12CD4 /* UIImage+RSKImageCropper.h */,
B87A9A2B19A4D39800D12CD4 /* UIImage+RSKImageCropper.m */,
B8D73A881B9B3C3F003AFA4A /* Resources */,
Expand Down Expand Up @@ -383,7 +375,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B8B3824C1AC721A7004C55F0 /* UIApplication+RSKImageCropper.m in Sources */,
B87A9A2C19A4D39800D12CD4 /* RSKImageScrollView.m in Sources */,
B87A9A2E19A4D39800D12CD4 /* RSKTouchView.m in Sources */,
B87A9A2019A4D31100D12CD4 /* RSKExampleViewController.m in Sources */,
Expand All @@ -402,7 +393,6 @@
files = (
B8F617681AE4468000499402 /* RSKImageScrollViewTests.m in Sources */,
B82DF9C11AE27E81001F4ED2 /* RSKTouchViewTests.m in Sources */,
B857871A1AE44E26004232F0 /* UIApplication+RSKImageCropperTests.m in Sources */,
B8F617661AE43CEF00499402 /* RSKImageCropperPerformanceTests.m in Sources */,
B82DF9C91AE2B28B001F4ED2 /* RSKImageCropViewControllerTests.m in Sources */,
);
Expand Down Expand Up @@ -492,7 +482,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
..,
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -546,7 +536,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
..,
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -557,11 +547,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = J3P7YV7464;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RSKImageCropperExample/RSKImageCropperExample-Prefix.pch";
INFOPLIST_FILE = "RSKImageCropperExample/RSKImageCropperExample-Info.plist";
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ruslanskorb.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = RSKImageCropperExample;
TARGETED_DEVICE_FAMILY = 1;
Expand All @@ -573,11 +563,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
DEVELOPMENT_TEAM = J3P7YV7464;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RSKImageCropperExample/RSKImageCropperExample-Prefix.pch";
INFOPLIST_FILE = "RSKImageCropperExample/RSKImageCropperExample-Info.plist";
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ruslanskorb.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = RSKImageCropperExample;
TARGETED_DEVICE_FAMILY = 1;
Expand Down
6 changes: 3 additions & 3 deletions Example/RSKImageCropperExample/Images.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.3.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ @interface RSKImageCropViewController (Testing)
@property (readonly, nonatomic) CGRect imageRect;
@property (strong, nonatomic) RSKImageScrollView *imageScrollView;
@property (assign, nonatomic) BOOL originalNavigationControllerNavigationBarHidden;
@property (assign, nonatomic) BOOL originalStatusBarHidden;
@property (assign, nonatomic) CGFloat rotationAngle;
@property (strong, nonatomic) UIRotationGestureRecognizer *rotationGestureRecognizer;

Expand Down Expand Up @@ -220,6 +219,11 @@ - (void)resetZoomScale;
describe(@"crop image", ^{
__block UIImageView *croppedImageImageView = nil;

before(^{
croppedImageImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 130.0, 130.0)];
croppedImageImageView.contentMode = UIViewContentModeScaleAspectFit;
});

dispatch_block_t sharedIt = ^{
UIImage *croppedImage = [imageCropViewController croppedImage:imageCropViewController.originalImage cropMode:imageCropViewController.cropMode cropRect:imageCropViewController.cropRect imageRect:imageCropViewController.imageRect rotationAngle:imageCropViewController.rotationAngle zoomScale:imageCropViewController.zoomScale maskPath:imageCropViewController.maskPath applyMaskToCroppedImage:imageCropViewController.applyMaskToCroppedImage];

Expand All @@ -234,8 +238,6 @@ - (void)resetZoomScale;
describe(@"crop mode is `RSKImageCropModeCircle`", ^{
before(^{
imageCropViewController = [[RSKImageCropViewController alloc] initWithImage:originalImage cropMode:RSKImageCropModeCircle];
croppedImageImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 130.0, 130.0)];
croppedImageImageView.contentMode = UIViewContentModeScaleAspectFit;

sharedLoadView();
});
Expand Down Expand Up @@ -1023,45 +1025,11 @@ - (void)resetZoomScale;
});

describe(@"status bar", ^{
if (@available(iOS 7.0, *)) {

it(@"hides status bar", ^{

imageCropViewController = [[RSKImageCropViewController alloc] init];
expect(imageCropViewController.prefersStatusBarHidden).to.beTruthy();
});
}
else {

it(@"hides status bar in viewWillAppear:", ^{
UIApplication *application = [UIApplication sharedApplication];
id mock = [OCMockObject partialMockForObject:application];

[[mock expect] setStatusBarHidden:YES];

imageCropViewController = [[RSKImageCropViewController alloc] init];
[imageCropViewController view];
[imageCropViewController viewWillAppear:NO];

[mock verify];
});
it(@"hides status bar", ^{

it(@"restores visibility of the status bar in viewWillDisappear:", ^{
imageCropViewController = [[RSKImageCropViewController alloc] init];

UIApplication *application = [UIApplication sharedApplication];
id mock = [OCMockObject partialMockForObject:application];

[imageCropViewController view];
[imageCropViewController viewWillAppear:NO];

[[mock expect] setStatusBarHidden:imageCropViewController.originalStatusBarHidden];

[imageCropViewController viewWillDisappear:NO];

[mock verify];
});
}
imageCropViewController = [[RSKImageCropViewController alloc] init];
expect(imageCropViewController.prefersStatusBarHidden).to.beTruthy();
});
});

describe(@"taps", ^{
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion Framework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.3.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "RSKImageCropper",
platforms: [.iOS(.v8)],
platforms: [.iOS(.v9)],
products: [
.library(
name: "RSKImageCropper",
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
An image cropper for iOS like in the Contacts app with support for landscape orientation.

## Installation
*RSKImageCropper requires iOS 6.0 or later.*
*RSKImageCropper requires iOS 9.0 or later.*

### Using [Swift Package Manager](https://swift.org/package-manager/)

1. To add the `RSKImageCropper` package to your Xcode project, select File > Swift Packages > Add Package Dependency and enter the repository URL.

https://github.com/ruslanskorb/RSKImageCropper.git

### Using [CocoaPods](http://cocoapods.org)

Expand Down
4 changes: 2 additions & 2 deletions RSKImageCropper.podspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = 'RSKImageCropper'
s.version = '2.3.1'
s.version = '3.0.0'
s.summary = 'An image cropper for iOS like in the Contacts app with support for landscape orientation.'
s.homepage = 'https://github.com/ruslanskorb/RSKImageCropper'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.authors = { 'Ruslan Skorb' => '[email protected]' }
s.source = { :git => 'https://github.com/ruslanskorb/RSKImageCropper.git', :tag => s.version.to_s }
s.platform = :ios, '6.0'
s.platform = :ios, '9.0'
s.module_map = 'RSKImageCropper/RSKImageCropper.modulemap'
s.source_files = 'RSKImageCropper/*.{h,m}'
s.resources = 'RSKImageCropper/RSKImageCropperStrings.bundle'
Expand Down
Loading

0 comments on commit 075c1a6

Please sign in to comment.