Skip to content

Commit 1c2c431

Browse files
sherginfacebook-github-bot
authored andcommitted
Fabric: Making UIView+ComponentViewProtocol to conform to the protocol
Summary: UIView+ComponentViewProtocol is useless without it. Conformance to the protocol is only purpose of this category. We didn't run into this issue because we have never used that yet. Reviewed By: mdvacca Differential Revision: D15419953 fbshipit-source-id: 84a430397e886c941d35075d9754eae5748c3a3f
1 parent b05761f commit 1c2c431

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

React/Fabric/Mounting/UIView+ComponentViewProtocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
1414
/**
1515
* Default implementation of RCTComponentViewProtocol.
1616
*/
17-
@interface UIView (ComponentViewProtocol)
17+
@interface UIView (ComponentViewProtocol) <RCTComponentViewProtocol>
1818

1919
+ (std::vector<facebook::react::ComponentDescriptorProvider>)supplementalComponentDescriptorProviders;
2020

React/Fabric/Mounting/UIView+ComponentViewProtocol.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717

1818
@implementation UIView (ComponentViewProtocol)
1919

20+
+ (ComponentDescriptorProvider)componentDescriptorProvider
21+
{
22+
RCTAssert(NO, @"`-[RCTComponentViewProtocol componentDescriptorProvider]` must be implemented in a concrete class.");
23+
return {};
24+
}
25+
2026
+ (std::vector<facebook::react::ComponentDescriptorProvider>)supplementalComponentDescriptorProviders
2127
{
2228
return {};

0 commit comments

Comments
 (0)