检测特定视图是否是网络视图
我正在创建一个具有 webview 和本机屏幕的应用程序。我创建了导航控制器,用于从 1 个本机屏幕移动到另一个本机屏幕。为了从 1 个 webview 移动到另一个,我使用 webview 的 goBack() 方法。
我想知道如何检测特定视图是 webview 还是本机屏幕。因为然后逻辑将写入导航控制器中,用于从本机导航到 webview,反之亦然。已经尝试过 webview delegate 的 shouldstartloadwithRequest 方法并尝试查找也有导航类型,但没有运气。
如果有人做过这样的事情,请建议这样做的方法。
谢谢
I am creating a application which have webviews as well as native screens.I have created nav controller for moving from 1 native screen to another.For moving from 1 webview to another i am using webview's goBack() method.
I want to know how one can detect whether a particular view is a webview or native screen.because then the logic will be written in the nav controller for navigating from native to webview and vice versa.Have tried shouldstartloadwithRequest method of webview delegate and tried finding out Navigationtype also but no luck.
if anybody have done such a thing please suggest the methods to do it.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以像这样检查班级成员资格:
You can check for class membership like this: