diff --git a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm index f78c2797f0ef7c..78d78b4d9731dc 100644 --- a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm @@ -20,18 +20,18 @@ using namespace facebook::react; -static UIView *_Nullable RCTFindTextInputWithNativeId(UIView *view, NSString *nativeId) +static RCTUIView *_Nullable RCTFindTextInputWithNativeId(RCTUIView *view, NSString *nativeId) // TODO(macOS GH#774) { if ([view respondsToSelector:@selector(inputAccessoryViewID)] && [view respondsToSelector:@selector(setInputAccessoryView:)]) { - UIView *typed = (UIView *)view; + RCTUIView *typed = (RCTUIView *)view; // TODO(macOS GH#774) if (!nativeId || [typed.inputAccessoryViewID isEqualToString:nativeId]) { return typed; } } - for (UIView *subview in view.subviews) { - UIView *result = RCTFindTextInputWithNativeId(subview, nativeId); + for (RCTUIView *subview in view.subviews) { // TODO(macOS GH#774) + RCTUIView *result = RCTFindTextInputWithNativeId(subview, nativeId); // TODO(macOS GH#774) if (result) { return result; } @@ -44,7 +44,7 @@ @implementation RCTInputAccessoryComponentView { InputAccessoryShadowNode::ConcreteState::Shared _state; RCTInputAccessoryContentView *_contentView; RCTSurfaceTouchHandler *_touchHandler; - UIView __weak *_textInput; + RCTUIView __weak *_textInput; // TODO(macOS GH#774) } - (instancetype)initWithFrame:(CGRect)frame @@ -83,7 +83,7 @@ - (BOOL)canBecomeFirstResponder return true; } -- (UIView *)inputAccessoryView +- (RCTUIView *)inputAccessoryView // TODO(macOS GH#774) { return _contentView; } @@ -95,12 +95,12 @@ + (ComponentDescriptorProvider)componentDescriptorProvider return concreteComponentDescriptorProvider(); } -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [_contentView insertSubview:childComponentView atIndex:index]; } -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [childComponentView removeFromSuperview]; } diff --git a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h index 554614a47f8e9e..56d776887957bd 100644 --- a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +++ b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h @@ -7,6 +7,6 @@ #import // TODO(macOS GH#774) -@interface RCTInputAccessoryContentView : UIView +@interface RCTInputAccessoryContentView : RCTUIView // TODO(macOS GH#774) @end diff --git a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm index 09de0401910031..f24f61be44e84d 100644 --- a/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +++ b/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm @@ -8,7 +8,7 @@ #import "RCTInputAccessoryContentView.h" @implementation RCTInputAccessoryContentView { - UIView *_safeAreaContainer; + RCTUIView *_safeAreaContainer; // TODO(macOS GH#774) NSLayoutConstraint *_heightConstraint; } @@ -17,7 +17,7 @@ - (instancetype)init if (self = [super init]) { self.autoresizingMask = UIViewAutoresizingFlexibleHeight; - _safeAreaContainer = [UIView new]; + _safeAreaContainer = [RCTUIView new]; // TODO(macOS GH#774) _safeAreaContainer.translatesAutoresizingMaskIntoConstraints = NO; [self addSubview:_safeAreaContainer]; @@ -40,7 +40,7 @@ - (CGSize)intrinsicContentSize return CGSizeZero; } -- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index +- (void)insertSubview:(RCTUIView *)view atIndex:(NSInteger)index // TODO(macOS GH#774) { [_safeAreaContainer insertSubview:view atIndex:index]; } diff --git a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index 5324963ea01a42..3bc381b6cfed05 100644 --- a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -22,7 +22,7 @@ @implementation RCTLegacyViewManagerInteropComponentView { NSMutableArray *_viewsToBeMounted; - NSMutableArray *_viewsToBeUnmounted; + NSMutableArray *_viewsToBeUnmounted; // TODO(macOS GH#774) RCTLegacyViewManagerInteropCoordinatorAdapter *_adapter; LegacyViewManagerInteropShadowNode::ConcreteState::Shared _state; BOOL _hasInvokedForwardingWarning; @@ -41,9 +41,9 @@ - (instancetype)initWithFrame:(CGRect)frame return self; } -- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event +- (RCTUIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS GH#774) { - UIView *result = [super hitTest:point withEvent:event]; + RCTUIView *result = [super hitTest:point withEvent:event]; // TODO(macOS GH#774) if (result == _adapter.paperView) { return self; @@ -149,7 +149,7 @@ - (void)prepareForRecycle [super prepareForRecycle]; } -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [_viewsToBeMounted addObject:@{ kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index], @@ -157,7 +157,7 @@ - (void)mountChildComponentView:(UIView *)childCompone }]; } -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { if (_adapter) { [_adapter.paperView removeReactSubview:childComponentView]; @@ -208,7 +208,7 @@ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask [_viewsToBeMounted removeAllObjects]; - for (UIView *view in _viewsToBeUnmounted) { + for (RCTUIView *view in _viewsToBeUnmounted) { // TODO(macOS GH#774) [_adapter.paperView removeReactSubview:view]; } diff --git a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h index 6fb76564eb510d..fa5a263e1870cb 100644 --- a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +++ b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithCoordinator:(RCTLegacyViewManagerInteropCoordinator *)coordinator reactTag:(NSInteger)tag; -@property (strong, nonatomic) UIView *paperView; +@property (strong, nonatomic) RCTUIView *paperView; // TODO(macOS GH#774) @property (nonatomic, copy, nullable) void (^eventInterceptor)(std::string eventName, folly::dynamic event); diff --git a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm index 1a9611ea5ebacb..22d151d9e8b8a1 100644 --- a/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +++ b/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm @@ -28,7 +28,7 @@ - (void)dealloc [_coordinator removeObserveForTag:_tag]; } -- (UIView *)paperView +- (RCTUIView *)paperView // TODO(macOS GH#774) { if (!_paperView) { _paperView = [_coordinator createPaperViewWithTag:_tag]; diff --git a/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm index 28c4bd227b7cc9..67cd49b2e0e152 100644 --- a/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm @@ -104,7 +104,7 @@ @implementation RCTModalHostViewComponentView { BOOL _shouldAnimatePresentation; BOOL _shouldPresent; BOOL _isPresented; - UIView *_modalContentsSnapshot; + RCTUIView *_modalContentsSnapshot; // TODO(macOS GH#774) } - (instancetype)initWithFrame:(CGRect)frame @@ -165,7 +165,7 @@ - (void)ensurePresentedOnlyIfNeeded _isPresented = NO; // To animate dismissal of view controller, snapshot of // view hierarchy needs to be added to the UIViewController. - UIView *snapshot = _modalContentsSnapshot; + RCTUIView *snapshot = _modalContentsSnapshot; // TODO(macOS GH#774) [self.viewController.view addSubview:snapshot]; [self dismissViewController:self.viewController @@ -269,12 +269,12 @@ - (void)updateState:(facebook::react::State::Shared const &)state _state = std::static_pointer_cast(state); } -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [self.viewController.view insertSubview:childComponentView atIndex:index]; } -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [childComponentView removeFromSuperview]; } diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h index b09d1bc1faeb51..7bd19f69537162 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN */ @protocol RCTEnhancedScrollViewOverridingDelegate -- (BOOL)touchesShouldCancelInContentView:(UIView *)view; +- (BOOL)touchesShouldCancelInContentView:(RCTUIView *)view; // TODO(macOS GH#774) @end diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm index 5427e2bfbb7d02..02d5f4af0cd1f4 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm @@ -88,7 +88,7 @@ - (void)setContentOffset:(CGPoint)contentOffset RCTSanitizeNaNValue(contentOffset.y, @"scrollView.contentOffset.y")); } -- (BOOL)touchesShouldCancelInContentView:(UIView *)view +- (BOOL)touchesShouldCancelInContentView:(RCTUIView *)view // TODO(macOS GH#774) { if ([_overridingDelegate respondsToSelector:@selector(touchesShouldCancelInContentView:)]) { return [_overridingDelegate touchesShouldCancelInContentView:view]; diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h index 5dbb7aed5bf3df..33651572822461 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN /* * Finds and returns the closet RCTScrollViewComponentView component to the given view */ -+ (nullable RCTScrollViewComponentView *)findScrollViewComponentViewForView:(UIView *)view; ++ (nullable RCTScrollViewComponentView *)findScrollViewComponentViewForView:(RCTUIView *)view; // TODO(macOS GH#774) /* * Returns an actual UIScrollView that this component uses under the hood. @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN * separate component views from auxiliary views to be able to reliably implement pull-to-refresh- and RTL-related * functionality. */ -@property (nonatomic, strong, readonly) UIView *containerView; +@property (nonatomic, strong, readonly) RCTUIView *containerView; // TODO(macOS GH#774) /* * Returns a delegate splitter that can be used to subscribe for UIScrollView delegate. diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index da4bda87e93e55..4c28bbef2c9cbb 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -102,7 +102,7 @@ @implementation RCTScrollViewComponentView { CGPoint _contentOffsetWhenClipped; } -+ (RCTScrollViewComponentView *_Nullable)findScrollViewComponentViewForView:(UIView *)view ++ (RCTScrollViewComponentView *_Nullable)findScrollViewComponentViewForView:(RCTUIView *)view // TODO(macOS GH#774) { do { view = view.superview; @@ -124,7 +124,7 @@ - (instancetype)initWithFrame:(CGRect)frame _shouldUpdateContentInsetAdjustmentBehavior = YES; [self addSubview:_scrollView]; - _containerView = [[UIView alloc] initWithFrame:CGRectZero]; + _containerView = [[RCTUIView alloc] initWithFrame:CGRectZero]; // TODO(macOS GH#774) [_scrollView addSubview:_containerView]; [self.scrollViewDelegateSplitter addDelegate:self]; @@ -334,12 +334,12 @@ - (void)_preserveContentOffsetIfNeededWithBlock:(void (^)())block [((RCTEnhancedScrollView *)_scrollView) preserveContentOffsetWithBlock:block]; } -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [_containerView insertSubview:childComponentView atIndex:index]; } -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { [childComponentView removeFromSuperview]; } @@ -350,11 +350,11 @@ - (void)unmountChildComponentView:(UIView *)childCompo */ - (BOOL)_shouldDisableScrollInteraction { - UIView *ancestorView = self.superview; + RCTUIView *ancestorView = self.superview; // TODO(macOS GH#774) while (ancestorView) { if ([ancestorView respondsToSelector:@selector(isJSResponder)]) { - BOOL isJSResponder = ((UIView *)ancestorView).isJSResponder; + BOOL isJSResponder = ((RCTUIView *)ancestorView).isJSResponder; // TODO(macOS GH#774) if (isJSResponder) { return YES; } @@ -409,7 +409,7 @@ - (void)prepareForRecycle #pragma mark - UIScrollViewDelegate -- (BOOL)touchesShouldCancelInContentView:(__unused UIView *)view +- (BOOL)touchesShouldCancelInContentView:(__unused RCTUIView *)view // TODO(macOS GH#774) { // Historically, `UIScrollView`s in React Native do not cancel touches // started on `UIControl`-based views (as normal iOS `UIScrollView`s do). @@ -519,7 +519,7 @@ - (void)_handleFinishedScrolling:(RCTUIScrollView *)scrollView // TODO(macOS GH# [self _updateStateWithContentOffset]; } -- (void)scrollViewWillBeginZooming:(RCTUIScrollView *)scrollView withView:(nullable UIView *)view // TODO(macOS GH#774) +- (void)scrollViewWillBeginZooming:(RCTUIScrollView *)scrollView withView:(nullable RCTUIView *)view // TODO(macOS GH#774) { [self _forceDispatchNextScrollEvent]; @@ -530,7 +530,7 @@ - (void)scrollViewWillBeginZooming:(RCTUIScrollView *)scrollView withView:(nulla std::static_pointer_cast(_eventEmitter)->onScrollBeginDrag([self _scrollViewMetrics]); } -- (void)scrollViewDidEndZooming:(RCTUIScrollView *)scrollView withView:(nullable UIView *)view atScale:(CGFloat)scale // TODO(macOS GH#774) +- (void)scrollViewDidEndZooming:(RCTUIScrollView *)scrollView withView:(nullable RCTUIView *)view atScale:(CGFloat)scale // TODO(macOS GH#774) { [self _forceDispatchNextScrollEvent]; @@ -542,7 +542,7 @@ - (void)scrollViewDidEndZooming:(RCTUIScrollView *)scrollView withView:(nullable [self _updateStateWithContentOffset]; } -- (UIView *)viewForZoomingInScrollView:(__unused RCTUIScrollView *)scrollView // TODO(macOS GH#774) +- (RCTUIView *)viewForZoomingInScrollView:(__unused RCTUIScrollView *)scrollView // TODO(macOS GH#774) { return _containerView; } @@ -610,7 +610,7 @@ - (void)scrollToEnd:(BOOL)animated #pragma mark - Child views mounting -- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView +- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView // TODO(macOS GH#774) { // Do nothing. ScrollView manages its subview clipping individually in `_remountChildren`. } diff --git a/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm b/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm index 7ce44a3f1741cf..60299e885afa69 100644 --- a/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +++ b/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm @@ -11,7 +11,7 @@ @implementation RCTAccessibilityElement - (CGRect)accessibilityFrame { - UIView *container = (UIView *)self.accessibilityContainer; + RCTUIView *container = (RCTUIView *)self.accessibilityContainer; // TODO(macOS GH#774) if (CGRectEqualToRect(_frame, CGRectZero)) { return UIAccessibilityConvertFrameToScreenCoordinates(container.bounds, container); } else { diff --git a/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h b/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h index 5187981b4f806d..489020c4b12117 100644 --- a/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +++ b/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h @@ -19,7 +19,7 @@ layoutManager:(RCTTextLayoutManager *)layoutManager paragraphAttributes:(facebook::react::ParagraphAttributes)paragraphAttributes frame:(CGRect)frame - view:(UIView *)view; + view:(RCTUIView *)view; // TODO(macOS GH#774) /* * Returns an array of `UIAccessibilityElement`s to be used for `UIAccessibilityContainer` implementation. diff --git a/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm b/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm index 13723e178bc6e8..dd369b3520d1c9 100644 --- a/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +++ b/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm @@ -26,14 +26,14 @@ @implementation RCTParagraphComponentAccessibilityProvider { RCTTextLayoutManager *_layoutManager; ParagraphAttributes _paragraphAttributes; CGRect _frame; - __weak UIView *_view; + __weak RCTUIView *_view; // TODO(macOS GH#774) } - (instancetype)initWithString:(facebook::react::AttributedString)attributedString layoutManager:(RCTTextLayoutManager *)layoutManager paragraphAttributes:(ParagraphAttributes)paragraphAttributes frame:(CGRect)frame - view:(UIView *)view + view:(RCTUIView *)view // TODO(macOS GH#774) { if (self = [super init]) { _attributedString = attributedString; diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index 658ea391a134be..9a623ca3a10b5d 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -30,7 +30,7 @@ @interface RCTTextInputComponentView () *_backedTextInputView; + RCTUIView *_backedTextInputView; // TODO(macOS GH#774) NSUInteger _mostRecentEventCount; NSAttributedString *_lastStringStateWasUpdatedWith; @@ -603,7 +603,7 @@ - (void)_setAttributedString:(NSAttributedString *)attributedString - (void)_setMultiline:(BOOL)multiline { [_backedTextInputView removeFromSuperview]; - UIView *backedTextInputView = multiline ? [RCTUITextView new] : [RCTUITextField new]; + RCTUIView *backedTextInputView = multiline ? [RCTUITextView new] : [RCTUITextField new]; // TODO(macOS GH#774) backedTextInputView.frame = _backedTextInputView.frame; RCTCopyBackedTextInput(_backedTextInputView, backedTextInputView); _backedTextInputView = backedTextInputView; diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h index 1d170c50bc50f6..2d62c452a72476 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h @@ -15,8 +15,8 @@ NS_ASSUME_NONNULL_BEGIN void RCTCopyBackedTextInput( - UIView *fromTextInput, - UIView *toTextInput); + RCTUIView *fromTextInput, + RCTUIView *toTextInput); // TODO(macOS GH#774) UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(std::optional autoCorrect); diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm index 99f46819af9d09..b91311e271b2da 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm @@ -19,8 +19,8 @@ } void RCTCopyBackedTextInput( - UIView *fromTextInput, - UIView *toTextInput) + RCTUIView *fromTextInput, + RCTUIView *toTextInput) // TODO(macOS GH#774) { toTextInput.attributedText = RCTSanitizeAttributedString(fromTextInput.attributedText); toTextInput.placeholder = fromTextInput.placeholder; diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h index e984a091ca1228..bd14b1b4048428 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h @@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN /** * UIView class for component. */ -@interface RCTViewComponentView : UIView { +@interface RCTViewComponentView : RCTUIView { @protected facebook::react::LayoutMetrics _layoutMetrics; facebook::react::SharedViewProps _props; facebook::react::SharedViewEventEmitter _eventEmitter; -} +} // TODO(macOS GH#774) /** * Represents the `UIView` instance that is being automatically attached to @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN * to embed/bridge pure native views as component views. * Defaults to `nil`. Assign `nil` to remove view as subview. */ -@property (nonatomic, strong, nullable) UIView *contentView; +@property (nonatomic, strong, nullable) RCTUIView *contentView; // TODO(macOS GH#774) /** * Provides access to `nativeId` prop of the component. diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 924b774b93d430..582a7cca00d54d 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -26,7 +26,7 @@ @implementation RCTViewComponentView { BOOL _needsInvalidateLayer; BOOL _isJSResponder; BOOL _removeClippedSubviews; - NSMutableArray *_reactSubviews; + NSMutableArray *_reactSubviews; // TODO(macOS GH#774) NSSet *_Nullable _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN; } @@ -48,7 +48,7 @@ - (instancetype)initWithFrame:(CGRect)frame return _props; } -- (void)setContentView:(UIView *)contentView +- (void)setContentView:(RCTUIView *)contentView // TODO(macOS GH#774) { if (_contentView) { [_contentView removeFromSuperview]; @@ -92,7 +92,7 @@ + (ComponentDescriptorProvider)componentDescriptorProvider return concreteComponentDescriptorProvider(); } -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { RCTAssert( childComponentView.superview == nil, @@ -109,7 +109,7 @@ - (void)mountChildComponentView:(UIView *)childCompone } } -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { if (_removeClippedSubviews) { [_reactSubviews removeObjectAtIndex:index]; @@ -133,7 +133,7 @@ - (void)unmountChildComponentView:(UIView *)childCompo [childComponentView removeFromSuperview]; } -- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView +- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView // TODO(macOS GH#774) { if (!_removeClippedSubviews) { // Use default behavior if unmounting is disabled @@ -154,7 +154,7 @@ - (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIVie clipRect = [clipView convertRect:clipRect toView:self]; // Mount / unmount views - for (UIView *view in _reactSubviews) { + for (RCTUIView *view in _reactSubviews) { // TODO(macOS GH#774) if (CGRectIntersectsRect(clipRect, view.frame)) { // View is at least partially visible, so remount it if unmounted [self addSubview:view]; @@ -438,7 +438,7 @@ - (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(NSSetpointerEvents) { case PointerEventsMode::Auto: @@ -480,7 +480,7 @@ - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event case PointerEventsMode::BoxOnly: return [self pointInside:point withEvent:event] ? self : nil; case PointerEventsMode::BoxNone: - UIView *view = [self betterHitTest:point withEvent:event]; + RCTUIView *view = [self betterHitTest:point withEvent:event]; // TODO(macOS GH#774) return view != self ? view : nil; } } @@ -662,10 +662,10 @@ - (NSObject *)accessibilityElement return self; } -static NSString *RCTRecursiveAccessibilityLabel(UIView *view) +static NSString *RCTRecursiveAccessibilityLabel(RCTUIView *view) // TODO(macOS GH#774) { NSMutableString *result = [NSMutableString stringWithString:@""]; - for (UIView *subview in view.subviews) { + for (RCTUIView *subview in view.subviews) { // TODO(macOS GH#774) NSString *label = subview.accessibilityLabel; if (!label) { label = RCTRecursiveAccessibilityLabel(subview); diff --git a/React/Fabric/Mounting/RCTComponentViewDescriptor.h b/React/Fabric/Mounting/RCTComponentViewDescriptor.h index 753fb399f70ae0..703b3b34a9d931 100644 --- a/React/Fabric/Mounting/RCTComponentViewDescriptor.h +++ b/React/Fabric/Mounting/RCTComponentViewDescriptor.h @@ -21,7 +21,7 @@ class RCTComponentViewDescriptor final { /* * Associated (and owned) native view instance. */ - __strong UIView *view = nil; + __strong RCTUIView *view = nil; // TODO(macOS GH#774) /* * Indicates a requirement to call on the view methods from diff --git a/React/Fabric/Mounting/RCTComponentViewProtocol.h b/React/Fabric/Mounting/RCTComponentViewProtocol.h index 6f0f98fa14062b..7ef2e065642e50 100644 --- a/React/Fabric/Mounting/RCTComponentViewProtocol.h +++ b/React/Fabric/Mounting/RCTComponentViewProtocol.h @@ -54,14 +54,14 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) { * component view. * Receiver must add `childComponentView` as a subview. */ -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index; +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774) /* * Called for unmounting (detaching) a child component view from `self` * component view. * Receiver must remove `childComponentView` as a subview. */ -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index; +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774) /* * Called for updating component's props. diff --git a/React/Fabric/Mounting/RCTComponentViewRegistry.h b/React/Fabric/Mounting/RCTComponentViewRegistry.h index 31acca6a2069f6..8cde9198889a05 100644 --- a/React/Fabric/Mounting/RCTComponentViewRegistry.h +++ b/React/Fabric/Mounting/RCTComponentViewRegistry.h @@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN * Finds a native component view by given `tag`. * Returns `nil` if there is no registered component with the `tag`. */ -- (nullable UIView *)findComponentViewWithTag:(facebook::react::Tag)tag; +- (nullable RCTUIView *)findComponentViewWithTag:(facebook::react::Tag)tag; // TODO(macOS GH#774) /** * Creates a component view with a given type and puts it to the recycle pool. diff --git a/React/Fabric/Mounting/RCTComponentViewRegistry.mm b/React/Fabric/Mounting/RCTComponentViewRegistry.mm index afd8024939f74a..4c9445376fea49 100644 --- a/React/Fabric/Mounting/RCTComponentViewRegistry.mm +++ b/React/Fabric/Mounting/RCTComponentViewRegistry.mm @@ -116,7 +116,7 @@ - (void)optimisticallyCreateComponentViewWithComponentHandle:(ComponentHandle)co return iterator->second; } -- (nullable UIView *)findComponentViewWithTag:(Tag)tag +- (nullable RCTUIView *)findComponentViewWithTag:(Tag)tag // TODO(macOS GH#774) { RCTAssertMainQueue(); auto iterator = _registry.find(tag); diff --git a/React/Fabric/Mounting/RCTMountingManager.h b/React/Fabric/Mounting/RCTMountingManager.h index 235ac0539a8e6e..7f2fd10d3e06c0 100644 --- a/React/Fabric/Mounting/RCTMountingManager.h +++ b/React/Fabric/Mounting/RCTMountingManager.h @@ -36,12 +36,12 @@ NS_ASSUME_NONNULL_BEGIN * influence the intrinsic size of the view and cannot be measured using UIView/UIKit layout API. * Must be called on the main thead. */ -- (void)attachSurfaceToView:(UIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; +- (void)attachSurfaceToView:(RCTUIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; // TODO(macOS GH#774) /** * Stops designating the view as a rendering viewport of a React Native surface. */ -- (void)detachSurfaceFromView:(UIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; +- (void)detachSurfaceFromView:(RCTUIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; // TODO(macOS GH#774) /** * Schedule a mounting transaction to be performed on the main thread. diff --git a/React/Fabric/Mounting/RCTMountingManager.mm b/React/Fabric/Mounting/RCTMountingManager.mm index 66ff0d50fdf2c9..d58d9f6fd09a04 100644 --- a/React/Fabric/Mounting/RCTMountingManager.mm +++ b/React/Fabric/Mounting/RCTMountingManager.mm @@ -29,7 +29,7 @@ using namespace facebook::react; -static SurfaceId RCTSurfaceIdForView(UIView *view) +static SurfaceId RCTSurfaceIdForView(RCTUIView *view) // TODO(macOS GH#774) { do { if (RCTIsReactRootView(@(view.tag))) { @@ -81,7 +81,7 @@ static void RCTPerformMountInstructions( auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag]; auto &parentViewDescriptor = [registry componentViewDescriptorWithTag:parentShadowView.tag]; - UIView *newChildComponentView = newChildViewDescriptor.view; + RCTUIView *newChildComponentView = newChildViewDescriptor.view; // TODO(macOS GH#774) RCTAssert(newChildShadowView.props, @"`newChildShadowView.props` must not be null."); @@ -109,7 +109,7 @@ static void RCTPerformMountInstructions( auto &oldChildShadowView = mutation.oldChildShadowView; auto &newChildShadowView = mutation.newChildShadowView; auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag]; - UIView *newChildComponentView = newChildViewDescriptor.view; + RCTUIView *newChildComponentView = newChildViewDescriptor.view; // TODO(macOS GH#774) auto mask = RNComponentViewUpdateMask{}; @@ -168,7 +168,7 @@ - (void)setContextContainer:(ContextContainer::Shared)contextContainer _contextContainer = contextContainer; } -- (void)attachSurfaceToView:(UIView *)view surfaceId:(SurfaceId)surfaceId +- (void)attachSurfaceToView:(RCTUIView *)view surfaceId:(SurfaceId)surfaceId // TODO(macOS GH#774) { RCTAssertMainQueue(); @@ -179,7 +179,7 @@ - (void)attachSurfaceToView:(UIView *)view surfaceId:(SurfaceId)surfaceId [view addSubview:rootViewDescriptor.view]; } -- (void)detachSurfaceFromView:(UIView *)view surfaceId:(SurfaceId)surfaceId +- (void)detachSurfaceFromView:(RCTUIView *)view surfaceId:(SurfaceId)surfaceId // TODO(macOS GH#774) { RCTAssertMainQueue(); RCTComponentViewDescriptor rootViewDescriptor = [_componentViewRegistry componentViewDescriptorWithTag:surfaceId]; @@ -287,7 +287,8 @@ - (void)setIsJSResponder:(BOOL)isJSResponder { ReactTag reactTag = shadowView.tag; RCTExecuteOnMainQueue(^{ - UIView *componentView = [self->_componentViewRegistry findComponentViewWithTag:reactTag]; + RCTUIView *componentView = + [self->_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774) [componentView setIsJSResponder:isJSResponder]; }); } @@ -297,7 +298,7 @@ - (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag componentDescriptor:(const ComponentDescriptor &)componentDescriptor { RCTAssertMainQueue(); - UIView *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; + RCTUIView *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774) SurfaceId surfaceId = RCTSurfaceIdForView(componentView); Props::Shared oldProps = [componentView props]; Props::Shared newProps = componentDescriptor.cloneProps( @@ -331,14 +332,14 @@ - (void)synchronouslyDispatchCommandOnUIThread:(ReactTag)reactTag args:(NSArray *)args { RCTAssertMainQueue(); - UIView *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; + RCTUIView *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774) [componentView handleCommand:commandName args:args]; } - (void)synchronouslyDispatchAccessbilityEventOnUIThread:(ReactTag)reactTag eventType:(NSString *)eventType { if ([@"focus" isEqualToString:eventType]) { - UIView *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; + RCTUIView *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774) UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, componentView); } } diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.h b/React/Fabric/Mounting/UIView+ComponentViewProtocol.h index a17eb8a6db6f7e..bb8a122c4dbae9 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.h @@ -14,13 +14,13 @@ NS_ASSUME_NONNULL_BEGIN /** * Default implementation of RCTComponentViewProtocol. */ -@interface UIView (ComponentViewProtocol) +@interface RCTUIView (ComponentViewProtocol) // TODO(macOS GH#774) + (std::vector)supplementalComponentDescriptorProviders; -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index; +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774) -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index; +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774) - (void)updateProps:(facebook::react::Props::Shared const &)props oldProps:(facebook::react::Props::Shared const &)oldProps; @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(nullable NSSet *)props; - (nullable NSSet *)propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN; -- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView; +- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView; // TODO(macOS GH#774) @end diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm index 4a4bd1eb5d556e..9068d9ec494f8e 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm @@ -15,7 +15,7 @@ using namespace facebook::react; -@implementation UIView (ComponentViewProtocol) +@implementation RCTUIView (ComponentViewProtocol) // TODO(macOS GH#774) + (ComponentDescriptorProvider)componentDescriptorProvider { @@ -28,7 +28,7 @@ + (ComponentDescriptorProvider)componentDescriptorProvider return {}; } -- (void)mountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)mountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { RCTAssert( childComponentView.superview == nil, @@ -40,7 +40,7 @@ - (void)mountChildComponentView:(UIView *)childCompone [self insertSubview:childComponentView atIndex:index]; } -- (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index +- (void)unmountChildComponentView:(RCTUIView *)childComponentView index:(NSInteger)index // TODO(macOS GH#774) { RCTAssert( childComponentView.superview == self, @@ -156,14 +156,14 @@ - (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(nullable NSSet *componentView = - [_mountingManager.componentViewRegistry findComponentViewWithTag:tag]; + RCTUIView *componentView = + [_mountingManager.componentViewRegistry findComponentViewWithTag:tag]; // TODO(macOS GH#774) return componentView; } @@ -186,8 +186,8 @@ - (BOOL)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag props:(NSDictiona } ReactTag tag = [reactTag integerValue]; - UIView *componentView = - [_mountingManager.componentViewRegistry findComponentViewWithTag:tag]; + RCTUIView *componentView = + [_mountingManager.componentViewRegistry findComponentViewWithTag:tag]; // TODO(macOS GH#774) if (componentView == nil) { return NO; // This view probably isn't managed by Fabric } diff --git a/React/Fabric/RCTSurfaceTouchHandler.h b/React/Fabric/RCTSurfaceTouchHandler.h index 8df850191b8e4a..8f8768357a8c63 100644 --- a/React/Fabric/RCTSurfaceTouchHandler.h +++ b/React/Fabric/RCTSurfaceTouchHandler.h @@ -15,8 +15,8 @@ NS_ASSUME_NONNULL_BEGIN * Attaches (and detaches) a view to the touch handler. * The receiver does not retain the provided view. */ -- (void)attachToView:(UIView *)view; -- (void)detachFromView:(UIView *)view; +- (void)attachToView:(RCTUIView *)view; // TODO(macOS GH#774) +- (void)detachFromView:(RCTUIView *)view; // TODO(macOS GH#774) /* * Offset of the attached view relative to the root component in points. diff --git a/React/Fabric/RCTSurfaceTouchHandler.mm b/React/Fabric/RCTSurfaceTouchHandler.mm index 0faf668f488622..e16cfe0949acd1 100644 --- a/React/Fabric/RCTSurfaceTouchHandler.mm +++ b/React/Fabric/RCTSurfaceTouchHandler.mm @@ -60,7 +60,7 @@ typedef NS_ENUM(NSInteger, RCTTouchEventType) { /* * A component view on which the touch was begun. */ - __strong UIView *componentView = nil; + __strong RCTUIView *componentView = nil; // TODO(macOS GH#774) struct Hasher { size_t operator()(const ActiveTouch &activeTouch) const @@ -80,8 +80,8 @@ bool operator()(const ActiveTouch &lhs, const ActiveTouch &rhs) const static void UpdateActiveTouchWithUITouch( ActiveTouch &activeTouch, UITouch *uiTouch, - UIView *rootComponentView, - CGPoint rootViewOriginOffset) + RCTUIView *rootComponentView, + CGPoint rootViewOriginOffset) // TODO(macOS GH#774) { CGPoint offsetPoint = [uiTouch locationInView:activeTouch.componentView]; CGPoint screenPoint = [uiTouch locationInView:uiTouch.window]; @@ -99,12 +99,12 @@ static void UpdateActiveTouchWithUITouch( } } -static ActiveTouch CreateTouchWithUITouch(UITouch *uiTouch, UIView *rootComponentView, CGPoint rootViewOriginOffset) +static ActiveTouch CreateTouchWithUITouch(UITouch *uiTouch, RCTUIView *rootComponentView, CGPoint rootViewOriginOffset) // TODO(macOS GH#774) { ActiveTouch activeTouch = {}; // Find closest Fabric-managed touchable view - UIView *componentView = uiTouch.view; + RCTUIView *componentView = uiTouch.view; // TODO(macOS GH#774) while (componentView) { if ([componentView respondsToSelector:@selector(touchEventEmitterAtPoint:)]) { activeTouch.eventEmitter = [(id)componentView @@ -164,7 +164,7 @@ @implementation RCTSurfaceTouchHandler { /* * We hold the view weakly to prevent a retain cycle. */ - __weak UIView *_rootComponentView; + __weak RCTUIView *_rootComponentView; // TODO(macOS GH#774) IdentifierPool<11> _identifierPool; } @@ -187,7 +187,7 @@ - (instancetype)init RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)action) -- (void)attachToView:(UIView *)view +- (void)attachToView:(RCTUIView *)view // TODO(macOS GH#774) { RCTAssert(self.view == nil, @"RCTTouchHandler already has attached view."); @@ -195,7 +195,7 @@ - (void)attachToView:(UIView *)view _rootComponentView = view; } -- (void)detachFromView:(UIView *)view +- (void)detachFromView:(RCTUIView *)view // TODO(macOS GH#774) { RCTAssertParam(view); RCTAssert(self.view == view, @"RCTTouchHandler attached to another view."); diff --git a/React/Views/RCTModalHostView.h b/React/Views/RCTModalHostView.h index be36ac164f0e76..db78f2f1382d47 100644 --- a/React/Views/RCTModalHostView.h +++ b/React/Views/RCTModalHostView.h @@ -16,7 +16,7 @@ @protocol RCTModalHostViewInteractor; -@interface RCTModalHostView : UIView +@interface RCTModalHostView : RCTUIView // TODO(macOS GH#774) @property (nonatomic, copy) NSString *animationType; @property (nonatomic, assign) UIModalPresentationStyle presentationStyle; diff --git a/React/Views/RCTWeakViewHolder.h b/React/Views/RCTWeakViewHolder.h index 5417f2e2e775ec..db0b489a1545c5 100644 --- a/React/Views/RCTWeakViewHolder.h +++ b/React/Views/RCTWeakViewHolder.h @@ -14,6 +14,6 @@ */ @protocol RCTWeakViewHolder -@property (nonatomic, strong) NSMapTable *weakViews; +@property (nonatomic, strong) NSMapTable *weakViews; // TODO(macOS GH#774) @end diff --git a/React/Views/RCTWrapperViewController.h b/React/Views/RCTWrapperViewController.h index 97f4816c9550eb..5f8357eaa4934d 100644 --- a/React/Views/RCTWrapperViewController.h +++ b/React/Views/RCTWrapperViewController.h @@ -11,6 +11,6 @@ @interface RCTWrapperViewController : UIViewController -- (instancetype)initWithContentView:(UIView *)contentView NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithContentView:(RCTUIView *)contentView NS_DESIGNATED_INITIALIZER; // TODO(macOS GH#774) @end diff --git a/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h b/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h index 7dec6d6bc19a01..64b97c1889fdc6 100644 --- a/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +++ b/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h @@ -20,13 +20,13 @@ typedef void (^InterceptorBlock)(std::string eventName, folly::dynamic event); - (instancetype)initWithComponentData:(RCTComponentData *)componentData bridge:(RCTBridge *)bridge; -- (UIView *)createPaperViewWithTag:(NSInteger)tag; +- (RCTUIView *)createPaperViewWithTag:(NSInteger)tag; // TODO(macOS GH#774) - (void)addObserveForTag:(NSInteger)tag usingBlock:(InterceptorBlock)block; - (void)removeObserveForTag:(NSInteger)tag; -- (void)setProps:(folly::dynamic const &)props forView:(UIView *)view; +- (void)setProps:(folly::dynamic const &)props forView:(RCTUIView *)view; // TODO(macOS GH#774) - (NSString *)componentViewName; diff --git a/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm b/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm index 0e21b7b1f218f1..cbbd0010dc1f2d 100644 --- a/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +++ b/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm @@ -71,9 +71,9 @@ - (void)removeObserveForTag:(NSInteger)tag [_eventInterceptors removeObjectForKey:[NSNumber numberWithInteger:tag]]; } -- (UIView *)createPaperViewWithTag:(NSInteger)tag; +- (RCTUIView *)createPaperViewWithTag:(NSInteger)tag; // TODO(macOS GH#774) { - UIView *view = [_componentData createViewWithTag:[NSNumber numberWithInteger:tag] rootTag:NULL]; + RCTUIView *view = [_componentData createViewWithTag:[NSNumber numberWithInteger:tag] rootTag:NULL]; // TODO(macOS GH#774) if ([_componentData.bridgelessViewManager conformsToProtocol:@protocol(RCTWeakViewHolder)]) { id weakViewHolder = (id)_componentData.bridgelessViewManager; if (!weakViewHolder.weakViews) { @@ -84,7 +84,7 @@ - (UIView *)createPaperViewWithTag:(NSInteger)tag; return view; } -- (void)setProps:(folly::dynamic const &)props forView:(UIView *)view +- (void)setProps:(folly::dynamic const &)props forView:(RCTUIView *)view // TODO(macOS GH#774) { if (props.isObject()) { NSDictionary *convertedProps = convertFollyDynamicToId(props);