mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add support for GIFs
Summary: Changelog: [internal] Add support or GIFs in Fabric. This reuses Paper's `RCTUIImageViewAnimated`. Reviewed By: fkgozali Differential Revision: D27115321 fbshipit-source-id: c512e395b5c71701b25abf745be74b51b21df5b2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4b3c8e76b2
commit
145110b8d4
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#import <React/RCTImageResponseDelegate.h>
|
||||
#import <React/RCTUIImageViewAnimated.h>
|
||||
#import <React/RCTViewComponentView.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@@ -15,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
@interface RCTImageComponentView : RCTViewComponentView <RCTImageResponseDelegate> {
|
||||
@protected
|
||||
UIImageView *_imageView;
|
||||
RCTUIImageViewAnimated *_imageView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -30,7 +30,7 @@ using namespace facebook::react;
|
||||
static auto const defaultProps = std::make_shared<ImageProps const>();
|
||||
_props = defaultProps;
|
||||
|
||||
_imageView = [[UIImageView alloc] initWithFrame:self.bounds];
|
||||
_imageView = [RCTUIImageViewAnimated new];
|
||||
_imageView.clipsToBounds = YES;
|
||||
_imageView.contentMode = RCTContentModeFromImageResizeMode(defaultProps->resizeMode);
|
||||
_imageView.layer.minificationFilter = kCAFilterTrilinear;
|
||||
|
||||
Reference in New Issue
Block a user