File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,14 +55,30 @@ - (void)layoutSubviews {
5555}
5656
5757- (void )didUpdateReactSubviews {
58- if (!self.reactPageViewController ) {
58+ if (!self.reactPageViewController && self. reactViewController != nil ) {
5959 [self embed ];
6060 [self setupInitialController ];
6161 } else {
6262 [self updateDataSource ];
6363 }
6464}
6565
66+ - (void )didMoveToSuperview {
67+ [super didMoveToSuperview ];
68+ if (!self.reactPageViewController && self.reactViewController != nil ) {
69+ [self embed ];
70+ [self setupInitialController ];
71+ }
72+ }
73+
74+ - (void )didMoveToWindow {
75+ [super didMoveToWindow ];
76+ if (!self.reactPageViewController && self.reactViewController != nil ) {
77+ [self embed ];
78+ [self setupInitialController ];
79+ }
80+ }
81+
6682- (void )embed {
6783 NSDictionary *options = @{ UIPageViewControllerOptionInterPageSpacingKey: @(self.pageMargin ) };
6884 UIPageViewController *pageViewController = [[UIPageViewController alloc ] initWithTransitionStyle: self .transitionStyle
You can’t perform that action at this time.
0 commit comments