如何禁用 TTNavigator 工具栏按钮?
请参考我的这篇文章 - 如何更改 TTNavigator (对于网页网址)底部栏颜色?
现在我必须禁用同一控制器的“在 Safari 中打开”选项。请给我建议一个方法。我还无法找到使用样式来做到这一点。我知道这是可能的,因为我在几个应用程序上看到过这个选项。
请帮忙...
Please refer my this post- how to change TTNavigator (for a web url) bottom bar color?
now i have to disable 'Open In Safari' option to the same controller. Please suggest me a way. I was unable to find to do this using styles yet. I know it is possible because i have seen the option on few apps.
Please help...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,TTNavigator 会将任何不匹配的 URL 转发给 TTWebController。
因此,如果您想更改 Web 视图,则必须将 TTWebController 子类化为您自己的类,并在应用程序委托中添加映射:
要删除在 safar 操作按钮中打开,请尝试将此函数添加到您子类化的自定义 TTWebController 中:
并
在您的应用程序委托中包含包罗万象的映射规则:
by default, TTNavigator will forward any URLs it doesn't match to TTWebController.
So if you want to change the web view, you will have to subclass TTWebController to your own class, and add the mapping in the app delegate:
To remove the open in safar action button, try adding this function to your custom TTWebController you subclass:
}
And include the catch-all mapping rule in your app delegate: