Skip to content

Commit

Permalink
Change RN_FABRIC_ENABLED to RCT_NEW_ARCH_ENABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
markrickert committed Dec 15, 2023
1 parent 1162432 commit 05ab455
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ios/Sources/AutoLayoutViewComponentView.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef AutoLayoutViewComponentView_h
#define AutoLayoutViewComponentView_h

#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED

#import <UIKit/UIKit.h>
#import <React/RCTViewComponentView.h>
Expand All @@ -11,6 +11,6 @@
@end


#endif /* RN_FABRIC_ENABLED */
#endif /* RCT_NEW_ARCH_ENABLED */

#endif /* AutoLayoutViewComponentView_h */
8 changes: 4 additions & 4 deletions ios/Sources/AutoLayoutViewComponentView.mm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import "AutoLayoutViewComponentView.h"
#import <React/RCTConversions.h>
#import <React/RCTViewManager.h>
Expand Down Expand Up @@ -27,13 +27,13 @@ - (instancetype)initWithFrame:(CGRect)frame
static const auto defaultProps = std::make_shared<const AutoLayoutViewProps>();
_props = defaultProps;
_autoLayoutView = [[AutoLayoutView alloc] initWithFrame:self.bounds];

// Due to view flattening, AutoLayoutView's children get moved to its parent (AutoLayoutViewComponentView) and
// AutoLayoutView is positioned above them consuming all events. Turning off userInteraction prevents that.
_autoLayoutView.userInteractionEnabled = false;

self.contentView = _autoLayoutView;

__weak AutoLayoutViewComponentView* weakSelf = self;
_autoLayoutView.onBlankAreaEventHandler = ^(CGFloat start, CGFloat end) {
AutoLayoutViewComponentView *strongSelf = weakSelf;
Expand Down Expand Up @@ -77,4 +77,4 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
return AutoLayoutViewComponentView.class;
}

#endif /* RN_FABRIC_ENABLED */
#endif /* RCT_NEW_ARCH_ENABLED */
2 changes: 1 addition & 1 deletion ios/Sources/CellContainerComponentView.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#import <UIKit/UIKit.h>

#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTViewComponentView.h>

@interface CellContainerComponentView : RCTViewComponentView
Expand Down
4 changes: 2 additions & 2 deletions ios/Sources/CellContainerComponentView.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "CellContainerComponentView.h"

#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>

#import <react/renderer/components/rnflashlist/ComponentDescriptors.h>
Expand Down Expand Up @@ -54,4 +54,4 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
#else
@implementation CellContainerComponentView
@end
#endif /* RN_FABRIC_ENABLED */
#endif /* RCT_NEW_ARCH_ENABLED */

0 comments on commit 05ab455

Please sign in to comment.