Skip to content

Commit

Permalink
feat(ios): add load method (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLewicki authored Aug 26, 2024
1 parent 43f5a21 commit 94e8553
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ios/Fabric/RNCPagerViewComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ @implementation RNCPagerViewComponentView {
NSInteger _initialPage;
}

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
Expand Down
6 changes: 6 additions & 0 deletions ios/LEGACY/Fabric/LEGACY_RNCPagerViewComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ @implementation LEGACY_RNCPagerViewComponentView {
UIScrollView *scrollView;
}

// Needed because of this: https://github.com/facebook/react-native/pull/37274
+ (void)load
{
[super load];
}

- (void)initializeNativePageViewController {
const auto &viewProps = *std::static_pointer_cast<const LEGACY_RNCViewPagerProps>(_props);
NSDictionary *options = @{ UIPageViewControllerOptionInterPageSpacingKey: @(viewProps.pageMargin) };
Expand Down

0 comments on commit 94e8553

Please sign in to comment.