From a3ad9120f693c39e8415b5f8f108bacb49865b54 Mon Sep 17 00:00:00 2001 From: Khoa Luu Date: Fri, 24 May 2019 13:31:52 +0700 Subject: [PATCH] Commit --- RNPinchZoomImage.podspec | 2 ++ ios/RNPhotoView.m | 24 +++++++++++++++++++++++- package.json | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/RNPinchZoomImage.podspec b/RNPinchZoomImage.podspec index efa0d4d..0fb6913 100644 --- a/RNPinchZoomImage.podspec +++ b/RNPinchZoomImage.podspec @@ -9,6 +9,8 @@ Pod::Spec.new do |s| s.license = package['license'] s.author = package['author'] s.platform = :ios, "9.0" + s.summary = "Component supports view image with pinch and zoom action" + s.homepage = "https://github.com/moonjava2005/react-native-pinch-zoom-image" s.source = { :git => "git://github.com/moonjava2005/react-native-pinch-zoom-image.git", :tag => s.version } s.source_files = "ios/**/*.{h,m}" s.requires_arc = true diff --git a/ios/RNPhotoView.m b/ios/RNPhotoView.m index f5b84cc..6dbe534 100644 --- a/ios/RNPhotoView.m +++ b/ios/RNPhotoView.m @@ -380,7 +380,7 @@ - (void)initView { _photoImageView = [[MWTapDetectingImageView alloc] init]; CGRect _photoFrame= CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height); _photoImageView.frame=_photoFrame; - _photoImageView.backgroundColor = [UIColor redColor]; + _photoImageView.backgroundColor = [UIColor clearColor]; __block RNPhotoView * blockSelf=self; [_photoImageView setOnFastImageLoad:^(NSDictionary *body){ [blockSelf onImageLoaded:body]; @@ -391,6 +391,28 @@ - (void)initView { [self addSubview:_photoImageView]; } +- (void)setOnPhotoViewerLoadStart:(int)onPhotoViewerLoadStart +{ + if(_photoImageView!=nil) + { + [_photoImageView setOnFastImageLoadStart:onPhotoViewerLoadStart]; + } +} +- (void)setOnPhotoViewerLoadEnd:(int)onPhotoViewerLoadEnd +{ + if(_photoImageView!=nil) + { + [_photoImageView setOnFastImageLoadEnd:onPhotoViewerLoadEnd]; + } +} +- (void)setOnPhotoViewerProgress:(int)onPhotoViewerProgress +{ + if(_photoImageView!=nil) + { + [_photoImageView setOnFastImageProgress:onPhotoViewerProgress]; + } +} + - (void) onImageLoaded:(NSDictionary*)body { UIImage *image=_photoImageView.image; diff --git a/package.json b/package.json index 100e788..824fd5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-pinch-zoom-image", - "version": "0.0.1", + "version": "0.0.2", "description": "Pinch to zoom and pan image", "main": "index.js", "scripts": {