Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.1.1 #252

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Example/RSKImageCropperExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = J3P7YV7464;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RSKImageCropperExample/RSKImageCropperExample-Prefix.pch";
INFOPLIST_FILE = "RSKImageCropperExample/RSKImageCropperExample-Info.plist";
MARKETING_VERSION = 4.1.0;
MARKETING_VERSION = 4.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.ruslanskorb.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = RSKImageCropperExample;
TARGETED_DEVICE_FAMILY = 1;
Expand All @@ -572,12 +572,12 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEVELOPMENT_TEAM = J3P7YV7464;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RSKImageCropperExample/RSKImageCropperExample-Prefix.pch";
INFOPLIST_FILE = "RSKImageCropperExample/RSKImageCropperExample-Info.plist";
MARKETING_VERSION = 4.1.0;
MARKETING_VERSION = 4.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.ruslanskorb.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = RSKImageCropperExample;
TARGETED_DEVICE_FAMILY = 1;
Expand Down
2 changes: 1 addition & 1 deletion RSKImageCropper.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'RSKImageCropper'
s.version = '4.1.0'
s.version = '4.1.1'
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' }
Expand Down
16 changes: 8 additions & 8 deletions RSKImageCropper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4.1.0;
CURRENT_PROJECT_VERSION = 4.1.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -297,7 +297,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4.1.0;
CURRENT_PROJECT_VERSION = 4.1.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -326,8 +326,8 @@
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 5;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 4.1.0;
DYLIB_CURRENT_VERSION = 4.1.0;
DYLIB_COMPATIBILITY_VERSION = 4.1.1;
DYLIB_CURRENT_VERSION = 4.1.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
INFOPLIST_FILE = Framework/Info.plist;
Expand All @@ -337,7 +337,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.1.0;
MARKETING_VERSION = 4.1.1;
MODULEMAP_FILE = "$(SRCROOT)/RSKImageCropper/RSKImageCropper.modulemap";
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
Expand All @@ -353,8 +353,8 @@
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 5;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 4.1.0;
DYLIB_CURRENT_VERSION = 4.1.0;
DYLIB_COMPATIBILITY_VERSION = 4.1.1;
DYLIB_CURRENT_VERSION = 4.1.1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
INFOPLIST_FILE = Framework/Info.plist;
Expand All @@ -364,7 +364,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.1.0;
MARKETING_VERSION = 4.1.1;
MODULEMAP_FILE = "$(SRCROOT)/RSKImageCropper/RSKImageCropper.modulemap";
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11";
Expand Down
4 changes: 3 additions & 1 deletion RSKImageCropper/RSKImageCropViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,9 @@ - (void)handleRotation:(UIRotationGestureRecognizer *)gestureRecognizer

- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated
{
[self.imageScrollView zoomToRect:[self.imageScrollView convertRect:rect fromView:self.view] animated:animated];
rect = [self.imageScrollView convertRect:rect fromView:self.view];
rect = [self.imageScrollView convertRect:rect toCoordinateSpace:self.imageScrollView.imageCoordinateSpace];
[self.imageScrollView zoomToRect:rect animated:animated];
}

#pragma mark - Public
Expand Down
13 changes: 5 additions & 8 deletions RSKImageCropper/RSKImageScrollView.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ NS_SWIFT_UI_ACTOR
*/
@property (nonatomic, nullable, strong) UIColor *imageBackgroundColor;

/**
The coordinate space of the image.
*/
@property (nonatomic, readonly) id<UICoordinateSpace> imageCoordinateSpace;

/**
The current frame of the image in the coordinate space of the image scroll view.
*/
Expand Down Expand Up @@ -107,14 +112,6 @@ NS_SWIFT_UI_ACTOR
*/
- (void)zoomToLocation:(CGPoint)location animated:(BOOL)animated;

/**
Zooms to a specific area of the image so that it’s visible in the image scroll view.

@param rect A rectangle defining an area of the image. The rectangle should be in the coordinate space of the image scroll view.
@param animated `YES` if the scrolling should be animated, `NO` if it should be immediate.
*/
- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated;

@end

@interface RSKImageScrollView (Deprecated)
Expand Down
12 changes: 5 additions & 7 deletions RSKImageCropper/RSKImageScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ - (void)setImageBackgroundColor:(UIColor *)imageBackgroundColor
_imageView.backgroundColor = imageBackgroundColor;
}

- (id<UICoordinateSpace>)imageCoordinateSpace
{
return [_imageView coordinateSpace];
}

- (CGRect)imageFrame
{
return _imageView.frame;
Expand Down Expand Up @@ -204,13 +209,6 @@ - (void)zoomToLocation:(CGPoint)location animated:(BOOL)animated
[self zoomToRect:rect animated:animated];
}

- (void)zoomToRect:(CGRect)rect animated:(BOOL)animated
{
rect = [_imageView convertRect:rect fromView:self];

[super zoomToRect:rect animated:animated];
}

#pragma mark - UIScrollViewDelegate

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
Expand Down