Skip to content

Commit 6de6067

Browse files
authored
Merge pull request #252 from ruslanskorb/develop
Version 4.1.1
2 parents 1717c49 + 86accea commit 6de6067

File tree

6 files changed

+26
-29
lines changed

6 files changed

+26
-29
lines changed

Example/RSKImageCropperExample.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,12 @@
555555
isa = XCBuildConfiguration;
556556
buildSettings = {
557557
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
558-
CURRENT_PROJECT_VERSION = 5;
558+
CURRENT_PROJECT_VERSION = 6;
559559
DEVELOPMENT_TEAM = J3P7YV7464;
560560
GCC_PRECOMPILE_PREFIX_HEADER = YES;
561561
GCC_PREFIX_HEADER = "RSKImageCropperExample/RSKImageCropperExample-Prefix.pch";
562562
INFOPLIST_FILE = "RSKImageCropperExample/RSKImageCropperExample-Info.plist";
563-
MARKETING_VERSION = 4.1.0;
563+
MARKETING_VERSION = 4.1.1;
564564
PRODUCT_BUNDLE_IDENTIFIER = "com.ruslanskorb.${PRODUCT_NAME:rfc1034identifier}";
565565
PRODUCT_NAME = RSKImageCropperExample;
566566
TARGETED_DEVICE_FAMILY = 1;
@@ -572,12 +572,12 @@
572572
isa = XCBuildConfiguration;
573573
buildSettings = {
574574
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
575-
CURRENT_PROJECT_VERSION = 5;
575+
CURRENT_PROJECT_VERSION = 6;
576576
DEVELOPMENT_TEAM = J3P7YV7464;
577577
GCC_PRECOMPILE_PREFIX_HEADER = YES;
578578
GCC_PREFIX_HEADER = "RSKImageCropperExample/RSKImageCropperExample-Prefix.pch";
579579
INFOPLIST_FILE = "RSKImageCropperExample/RSKImageCropperExample-Info.plist";
580-
MARKETING_VERSION = 4.1.0;
580+
MARKETING_VERSION = 4.1.1;
581581
PRODUCT_BUNDLE_IDENTIFIER = "com.ruslanskorb.${PRODUCT_NAME:rfc1034identifier}";
582582
PRODUCT_NAME = RSKImageCropperExample;
583583
TARGETED_DEVICE_FAMILY = 1;

RSKImageCropper.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'RSKImageCropper'
3-
s.version = '4.1.0'
3+
s.version = '4.1.1'
44
s.summary = 'An image cropper for iOS like in the Contacts app with support for landscape orientation.'
55
s.homepage = 'https://github.com/ruslanskorb/RSKImageCropper'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

RSKImageCropper.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
237237
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
238238
COPY_PHASE_STRIP = NO;
239-
CURRENT_PROJECT_VERSION = 4.1.0;
239+
CURRENT_PROJECT_VERSION = 4.1.1;
240240
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
241241
ENABLE_STRICT_OBJC_MSGSEND = YES;
242242
ENABLE_TESTABILITY = YES;
@@ -297,7 +297,7 @@
297297
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
298298
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
299299
COPY_PHASE_STRIP = NO;
300-
CURRENT_PROJECT_VERSION = 4.1.0;
300+
CURRENT_PROJECT_VERSION = 4.1.1;
301301
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
302302
ENABLE_NS_ASSERTIONS = NO;
303303
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -326,8 +326,8 @@
326326
CODE_SIGN_IDENTITY = "";
327327
CURRENT_PROJECT_VERSION = 5;
328328
DEFINES_MODULE = YES;
329-
DYLIB_COMPATIBILITY_VERSION = 4.1.0;
330-
DYLIB_CURRENT_VERSION = 4.1.0;
329+
DYLIB_COMPATIBILITY_VERSION = 4.1.1;
330+
DYLIB_CURRENT_VERSION = 4.1.1;
331331
DYLIB_INSTALL_NAME_BASE = "@rpath";
332332
ENABLE_MODULE_VERIFIER = YES;
333333
INFOPLIST_FILE = Framework/Info.plist;
@@ -337,7 +337,7 @@
337337
"@executable_path/Frameworks",
338338
"@loader_path/Frameworks",
339339
);
340-
MARKETING_VERSION = 4.1.0;
340+
MARKETING_VERSION = 4.1.1;
341341
MODULEMAP_FILE = "$(SRCROOT)/RSKImageCropper/RSKImageCropper.modulemap";
342342
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
343343
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
@@ -353,8 +353,8 @@
353353
CODE_SIGN_IDENTITY = "";
354354
CURRENT_PROJECT_VERSION = 5;
355355
DEFINES_MODULE = YES;
356-
DYLIB_COMPATIBILITY_VERSION = 4.1.0;
357-
DYLIB_CURRENT_VERSION = 4.1.0;
356+
DYLIB_COMPATIBILITY_VERSION = 4.1.1;
357+
DYLIB_CURRENT_VERSION = 4.1.1;
358358
DYLIB_INSTALL_NAME_BASE = "@rpath";
359359
ENABLE_MODULE_VERIFIER = YES;
360360
INFOPLIST_FILE = Framework/Info.plist;
@@ -364,7 +364,7 @@
364364
"@executable_path/Frameworks",
365365
"@loader_path/Frameworks",
366366
);
367-
MARKETING_VERSION = 4.1.0;
367+
MARKETING_VERSION = 4.1.1;
368368
MODULEMAP_FILE = "$(SRCROOT)/RSKImageCropper/RSKImageCropper.modulemap";
369369
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
370370
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";

RSKImageCropper/RSKImageCropViewController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,9 @@ - (void)handleRotation:(UIRotationGestureRecognizer *)gestureRecognizer
652652

653653
- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated
654654
{
655-
[self.imageScrollView zoomToRect:[self.imageScrollView convertRect:rect fromView:self.view] animated:animated];
655+
rect = [self.imageScrollView convertRect:rect fromView:self.view];
656+
rect = [self.imageScrollView convertRect:rect toCoordinateSpace:self.imageScrollView.imageCoordinateSpace];
657+
[self.imageScrollView zoomToRect:rect animated:animated];
656658
}
657659

658660
#pragma mark - Public

RSKImageCropper/RSKImageScrollView.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ NS_SWIFT_UI_ACTOR
7575
*/
7676
@property (nonatomic, nullable, strong) UIColor *imageBackgroundColor;
7777

78+
/**
79+
The coordinate space of the image.
80+
*/
81+
@property (nonatomic, readonly) id<UICoordinateSpace> imageCoordinateSpace;
82+
7883
/**
7984
The current frame of the image in the coordinate space of the image scroll view.
8085
*/
@@ -107,14 +112,6 @@ NS_SWIFT_UI_ACTOR
107112
*/
108113
- (void)zoomToLocation:(CGPoint)location animated:(BOOL)animated;
109114

110-
/**
111-
Zooms to a specific area of the image so that it’s visible in the image scroll view.
112-
113-
@param rect A rectangle defining an area of the image. The rectangle should be in the coordinate space of the image scroll view.
114-
@param animated `YES` if the scrolling should be animated, `NO` if it should be immediate.
115-
*/
116-
- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated;
117-
118115
@end
119116

120117
@interface RSKImageScrollView (Deprecated)

RSKImageCropper/RSKImageScrollView.m

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ - (void)setImageBackgroundColor:(UIColor *)imageBackgroundColor
133133
_imageView.backgroundColor = imageBackgroundColor;
134134
}
135135

136+
- (id<UICoordinateSpace>)imageCoordinateSpace
137+
{
138+
return [_imageView coordinateSpace];
139+
}
140+
136141
- (CGRect)imageFrame
137142
{
138143
return _imageView.frame;
@@ -204,13 +209,6 @@ - (void)zoomToLocation:(CGPoint)location animated:(BOOL)animated
204209
[self zoomToRect:rect animated:animated];
205210
}
206211

207-
- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated
208-
{
209-
rect = [_imageView convertRect:rect fromView:self];
210-
211-
[super zoomToRect:rect animated:animated];
212-
}
213-
214212
#pragma mark - UIScrollViewDelegate
215213

216214
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView

0 commit comments

Comments
 (0)