Skip to content

Conversation

ciceroduarte
Copy link
Contributor

Removing commented code;
Using withZoom and hidden values;
Verifying WebView instance before "navigate", "evalJavascript", "resize" and "closeWebView".

Removing commented code;
Using withZoom and hidden values;
Verifying WebView instance before "navigate", "evalJavascript", "resize" and "closeWebView".
Copy link
Collaborator

@lejard-h lejard-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution 👍 , I added some comments

_enableZoom = [withZoom boolValue];
}

if (hidden != (id)[NSNull null] && [hidden boolValue]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so can we remove the condition ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Yes! BOOL values are 0 by default in obj-c, so we don't need to check if it's nil

self.webview.navigationDelegate = self;
[self.viewController.view addSubview:self.webview];

if (withZoom != (id)[NSNull null] && [withZoom boolValue]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here, can we remove the condition ?

@lejard-h lejard-h merged commit 0862327 into fluttercommunity:master Apr 1, 2018
charafau pushed a commit that referenced this pull request Apr 7, 2020
Using WKWebView instead of UIWebView
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants