Create internal Fabric subclass of RCTImageComponentView

Summary: Changelog: [Internal] Create internal Fabric subclass of RCTImageComponentView

Reviewed By: sammy-SC

Differential Revision: D23211115

fbshipit-source-id: 0e756de3f3e555bf212dc88dfc8c32930ac85132
This commit is contained in:
Paige Sun 2020-08-22 01:17:11 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 2d34c221f2
Коммит 6aa63272dc
4 изменённых файлов: 24 добавлений и 8 удалений

Просмотреть файл

@ -7,6 +7,7 @@
#import "RCTImageComponentView.h"
#import <React/RCTConversions.h>
#import <React/RCTImageBlurUtils.h>
#import <React/RCTImageResponseDelegate.h>
#import <React/RCTImageResponseObserverProxy.h>
@ -18,9 +19,6 @@
#import <react/renderer/imagemanager/RCTImageInstrumentationProxy.h>
#import <react/renderer/imagemanager/RCTImagePrimitivesConversions.h>
#import "RCTConversions.h"
#import "RCTFabricComponentsPlugins.h"
using namespace facebook::react;
@interface RCTImageComponentView () <RCTImageResponseDelegate>
@ -209,6 +207,17 @@ using namespace facebook::react;
@end
#ifdef __cplusplus
extern "C" {
#endif
// Can't the import generated Plugin.h because plugins are not in this BUCK target
Class<RCTComponentViewProtocol> RCTImageCls(void);
#ifdef __cplusplus
}
#endif
Class<RCTComponentViewProtocol> RCTImageCls(void)
{
return RCTImageComponentView.class;

Просмотреть файл

@ -36,7 +36,6 @@ Class<RCTComponentViewProtocol> RCTActivityIndicatorViewCls(void) __attribute__(
Class<RCTComponentViewProtocol> RCTSliderCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTSwitchCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTUnimplementedNativeViewCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTImageCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTParagraphCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTTextInputCls(void) __attribute__((used));
Class<RCTComponentViewProtocol> RCTInputAccessoryCls(void) __attribute__((used));

Просмотреть файл

@ -25,7 +25,6 @@ Class<RCTComponentViewProtocol> RCTFabricComponentsProvider(const char *name) {
{"Slider", RCTSliderCls},
{"Switch", RCTSwitchCls},
{"UnimplementedNativeView", RCTUnimplementedNativeViewCls},
{"Image", RCTImageCls},
{"Paragraph", RCTParagraphCls},
{"TextInput", RCTTextInputCls},
{"InputAccessoryView", RCTInputAccessoryCls},

Просмотреть файл

@ -9,14 +9,12 @@
#import <React/RCTAssert.h>
#import <React/RCTBorderDrawing.h>
#import <React/RCTConversions.h>
#import <objc/runtime.h>
#import <react/renderer/components/view/ViewComponentDescriptor.h>
#import <react/renderer/components/view/ViewEventEmitter.h>
#import <react/renderer/components/view/ViewProps.h>
#import "RCTConversions.h"
#import "RCTFabricComponentsPlugins.h"
using namespace facebook::react;
@implementation RCTViewComponentView {
@ -622,6 +620,17 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
@end
#ifdef __cplusplus
extern "C" {
#endif
// Can't the import generated Plugin.h because plugins are not in this BUCK target
Class<RCTComponentViewProtocol> RCTViewCls(void);
#ifdef __cplusplus
}
#endif
Class<RCTComponentViewProtocol> RCTViewCls(void)
{
return RCTViewComponentView.class;