Skip to content
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

Webview offset and height issue on ios when toolbarposition=top #374

Open
lovelyelfpop opened this issue Dec 13, 2018 · 1 comment
Open
Labels

Comments

@lovelyelfpop
Copy link

lovelyelfpop commented Dec 13, 2018

When toolbarposition=top on ios, the body was covered by the webview at the top, it's the default behavior of this plugin.
0

Then I found this pull request, change the rePositionViews function would sove this problem, but it leads to a new one.

On iphoneX, the webview is out of the screen at the bottom, it seems the webview is 20px higher than it should be.
1

So, I cut the webview's height, [self.webView setFrame:CGRectMake(self.webView.frame.origin.x, TOOLBAR_HEIGHT + [self getStatusBarOffset], self.webView.frame.size.width, self.webView.frame.size.height - [self getStatusBarOffset])];, but it leaves 20px grey area at the bottom, the webview is 20px shorter than it should be.
2

Could it be [self.webView setFrame:CGRectMake(self.webView.frame.origin.x, TOOLBAR_HEIGHT + [self getStatusBarOffset], self.webView.frame.size.width, self.webView.frame.size.height - [self getStatusBarOffset] + STATUSBAR_HEIGHT)];, because the viewbounds height is subtracted by STATUSBAR_HEIGHT in viewWillApear? It looks pretty good!
3

@janpio janpio added the support label Dec 13, 2018
@huahuichin
Copy link

hi, i still have a problem, how to remove the top gray area

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants