|
@@ -70,7 +70,7 @@ static NSString *const MessageHanderName = @"ReactNative";
|
70
|
70
|
_automaticallyAdjustContentInsets = YES;
|
71
|
71
|
_contentInset = UIEdgeInsetsZero;
|
72
|
72
|
}
|
73
|
|
-
|
|
73
|
+
|
74
|
74
|
// Workaround for a keyboard dismissal bug present in iOS 12
|
75
|
75
|
// https://openradar.appspot.com/radar?id=5018321736957952
|
76
|
76
|
if (@available(iOS 12.0, *)) {
|
|
@@ -111,6 +111,7 @@ static NSString *const MessageHanderName = @"ReactNative";
|
111
|
111
|
_webView.UIDelegate = self;
|
112
|
112
|
_webView.navigationDelegate = self;
|
113
|
113
|
_webView.scrollView.scrollEnabled = _scrollEnabled;
|
|
114
|
+ _webView.scrollView.pagingEnabled = _pagingEnabled;
|
114
|
115
|
_webView.scrollView.bounces = _bounces;
|
115
|
116
|
[_webView addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew context:nil];
|
116
|
117
|
_webView.allowsBackForwardNavigationGestures = _allowsBackForwardNavigationGestures;
|
|
@@ -137,7 +138,7 @@ static NSString *const MessageHanderName = @"ReactNative";
|
137
|
138
|
[_webView removeFromSuperview];
|
138
|
139
|
_webView = nil;
|
139
|
140
|
}
|
140
|
|
-
|
|
141
|
+
|
141
|
142
|
[super removeFromSuperview];
|
142
|
143
|
}
|
143
|
144
|
|
|
@@ -146,7 +147,7 @@ static NSString *const MessageHanderName = @"ReactNative";
|
146
|
147
|
keyboardTimer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(keyboardDisplacementFix) userInfo:nil repeats:false];
|
147
|
148
|
[[NSRunLoop mainRunLoop] addTimer:keyboardTimer forMode:NSRunLoopCommonModes];
|
148
|
149
|
}
|
149
|
|
-
|
|
150
|
+
|
150
|
151
|
-(void)keyboardWillShow
|
151
|
152
|
{
|
152
|
153
|
if (keyboardTimer != nil) {
|