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

关于需要设置 DSUIDelegate 的优化建议 #117

Open
pikacode opened this issue May 11, 2020 · 0 comments
Open

关于需要设置 DSUIDelegate 的优化建议 #117

pikacode opened this issue May 11, 2020 · 0 comments

Comments

@pikacode
Copy link

因为您已经使用了自定义的 webview,可以通过重写 UIDelegate 的 setter 方法来实现同样的目的,而不需要暴露另外的 DSUIDelegate 让开发者使用

-(void)setUIDelegate:(id <WKUIDelegate>)delegate{
     //这里对内部的 _DSUIDelegate 赋值,而 UIDelegate 仍等于 self
     _DSUIDelegate = delegate;
}
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

1 participant