Add preference for native scroll to top

- As described in https://issues.apache.org/jira/browse/CB-13124
This commit is contained in:
Lu Wang
2017-07-26 15:59:36 -07:00
committed by Lu Wang
parent 1bb250788e
commit b204d2747d
2 changed files with 11 additions and 1 deletions
+7 -1
View File
@@ -137,8 +137,14 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
[self setStatusBarStyle:[self settingForKey:setting]];
}
setting = @"StatusBarDefaultScrollToTop";
if ([self settingForKey:setting]) {
self.webView.scrollView.scrollsToTop = [(NSNumber*)[self settingForKey:setting] boolValue];
} else {
self.webView.scrollView.scrollsToTop = NO;
}
// blank scroll view to intercept status bar taps
self.webView.scrollView.scrollsToTop = NO;
UIScrollView *fakeScrollView = [[UIScrollView alloc] initWithFrame:UIScreen.mainScreen.bounds];
fakeScrollView.delegate = self;
fakeScrollView.scrollsToTop = YES;