Skip to content

Commit

Permalink
fix(ios): Fixed the issue that pictures would not be displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexLiu-cn authored and zoomchan-cxj committed Mar 16, 2023
1 parent c003e67 commit 6163c76
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ios/sdk/component/image/HippyImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ @interface HippyImageView () {
__weak CALayer *_borderWidthLayer;
BOOL _needsUpdateBorderRadiusManully;
CGSize _size;
CGRect _imageRect;
}

/// Animated Image Operation (should avoid multi-thread manipulation)
Expand Down Expand Up @@ -321,11 +322,14 @@ - (void)setBlurRadius:(CGFloat)blurRadius {
}

- (void)setFrame:(CGRect)frame {
BOOL result = CGRectEqualToRect(frame, _imageRect);
if (result) {
return;
}
[super setFrame:frame];
_size = frame.size;
if (nil == self.image) {
[self reloadImage];
}
_imageRect = frame;
[self reloadImage];
[self updateCornerRadius];
}

Expand Down

0 comments on commit 6163c76

Please sign in to comment.