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

可以加subviewcontroller 用UIViewController包一個 UIWebView嗎 #19

Open
IvanGzx opened this issue Apr 17, 2018 · 3 comments
Open

Comments

@IvanGzx
Copy link

IvanGzx commented Apr 17, 2018

No description provided.

@panghaijiao
Copy link
Owner

可以的,只要自定义scrollview就可以了,可以通过tabContentScrollView自定义你VC的scrollView

@IvanGzx
Copy link
Author

IvanGzx commented Apr 19, 2018

我設定了uiwebview 在viewcontroller, 然後在這裡加了UIwebview, 一切都可以 但webview 裡面textinpiut, 鍵盤彈出時就bug了, scroll offset 就不正確
if ([self.view isKindOfClass:[UIScrollView class]]) {
[self setTabContentScrollView:(UIScrollView )self.view];
} else {
for (UIScrollView subview in self.view.subviews) {
if ([subview isKindOfClass:[UIScrollView class]] && CGSizeEqualToSize(subview.frame.size, self.view.frame.size)) {
[self setTabContentScrollView:subview];
break;
}else if ([subview isKindOfClass:[UIWebView class]]) {
UIWebView
webView = (UIWebView
) subview;
[self setTabContentScrollView:webView.scrollView];
break;
}
}
}

@panghaijiao
Copy link
Owner

我不是很清楚哪里出了问题,你能定位到什么原因吗?

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

No branches or pull requests

2 participants