Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
moonjava2005 committed May 24, 2019
1 parent afb75f3 commit a3ad912
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 2 additions & 0 deletions RNPinchZoomImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 23 additions & 1 deletion ios/RNPhotoView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit a3ad912

Please sign in to comment.