Fabric: Marking RCTViewComponentView's methods from RCTComponentViewProtocol as NS_REQUIRES_SUPER

Summary: If some class or category override/implement one of those methods, it implies that subclasses must call super for them. `NS_REQUIRES_SUPER` allows to enforce this constraint.

Reviewed By: JoshuaGross

Differential Revision: D14896804

fbshipit-source-id: a481f16e1f7ab901d70deb6486f2ca1cf19dd8d7
This commit is contained in:
Valentin Shergin
2019-04-16 07:23:07 -07:00
committed by Facebook Github Bot
parent 6392894e59
commit ba199eade5

View File

@@ -68,6 +68,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
/**
* Enforcing `call super` semantic for overridden methods from `RCTComponentViewProtocol`.
*/
- (void)updateProps:(facebook::react::SharedProps)props
oldProps:(facebook::react::SharedProps)oldProps NS_REQUIRES_SUPER;
- (void)updateEventEmitter:(facebook::react::SharedEventEmitter)eventEmitter NS_REQUIRES_SUPER;
- (void)updateLayoutMetrics:(facebook::react::LayoutMetrics)layoutMetrics
oldLayoutMetrics:(facebook::react::LayoutMetrics)oldLayoutMetrics NS_REQUIRES_SUPER;
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask NS_REQUIRES_SUPER;
- (void)prepareForRecycle NS_REQUIRES_SUPER;
@end
NS_ASSUME_NONNULL_END