-
Notifications
You must be signed in to change notification settings - Fork 7
RMET-4216 ::: adding allowsBackForwardNavigationGestures for WKWebView on iOS #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
bfdde25
542609b
9c4133b
ce62d41
fb602f0
0c9c1a5
afdd145
27b2cb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ public class OSIABWebViewOptions: OSIABOptions { | |
| let surpressIncrementalRendering: Bool | ||
| /// Sets a custom user agent for the WebView. | ||
| let customUserAgent: String? | ||
| /// Indicates if swipe gestures for navigating backward and forward in the WebView history are enabled. | ||
| let allowsBackForwardNavigationGestures: Bool | ||
|
|
||
| /// Constructor method. | ||
| /// - Parameters: | ||
|
|
@@ -49,6 +51,7 @@ public class OSIABWebViewOptions: OSIABOptions { | |
| /// - viewStyle: The view style to present. `defaultValue` is provided in case of no value. | ||
| /// - animationEffect: The animation effect for the presentation appearance and dismissal. `defaultValue` is provided in case of no value. | ||
| /// - customUserAgent: Sets a custom user agent for the WebView.` | ||
| /// - allowsBackForwardNavigationGestures: Indicates if swipe gestures for navigating backward and forward in the WebView history are enabled. | ||
| public init( | ||
| showURL: Bool = true, | ||
| showToolbar: Bool = true, | ||
|
|
@@ -65,7 +68,8 @@ public class OSIABWebViewOptions: OSIABOptions { | |
| surpressIncrementalRendering: Bool = false, | ||
| viewStyle: OSIABViewStyle = .defaultValue, | ||
| animationEffect: OSIABAnimationEffect = .defaultValue, | ||
| customUserAgent: String? = nil | ||
| customUserAgent: String? = nil, | ||
| allowsBackForwardNavigationGestures: Bool = true, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default value of the WKWebView's allowsBackForwardNavigationGestures property is false. Would it make sense to change this default value?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually discussed this with Alexandre, and he suggested that enabling allowsBackForwardNavigationGestures by default makes more sense, as it improves the navigation experience in most use cases. |
||
| ) { | ||
| self.showURL = showURL | ||
| self.showToolbar = showToolbar | ||
|
|
@@ -81,6 +85,7 @@ public class OSIABWebViewOptions: OSIABOptions { | |
| self.allowInLineMediaPlayback = allowInLineMediaPlayback | ||
| self.surpressIncrementalRendering = surpressIncrementalRendering | ||
| self.customUserAgent = customUserAgent | ||
| self.allowsBackForwardNavigationGestures = allowsBackForwardNavigationGestures | ||
| super.init(viewStyle: viewStyle, animationEffect: animationEffect) | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually update the version number only at the time of release, keeping 'Unreleased' until then. I think this helps avoid confusion about whether a feature has been released or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated with the upcoming version instead of “Unreleased”, since this is the only pending feature and we’re planning to release it next week. I had already validated this with Alexandre, and he suggested going ahead with the version update now.