File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,30 @@ - (void)layoutSubviews {
55
55
}
56
56
57
57
- (void )didUpdateReactSubviews {
58
- if (!self.reactPageViewController ) {
58
+ if (!self.reactPageViewController && self. reactViewController != nil ) {
59
59
[self embed ];
60
60
[self setupInitialController ];
61
61
} else {
62
62
[self updateDataSource ];
63
63
}
64
64
}
65
65
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
+
66
82
- (void )embed {
67
83
NSDictionary *options = @{ UIPageViewControllerOptionInterPageSpacingKey: @(self.pageMargin ) };
68
84
UIPageViewController *pageViewController = [[UIPageViewController alloc ] initWithTransitionStyle: self .transitionStyle
You can’t perform that action at this time.
0 commit comments