Modify Specific UIWebView code to have an address bar similar to Safari

时光毁灭记忆、已成空白 提交于 2019-12-24 12:32:54

问题


I've built an app using PhoneGap and am using its InAppBrowser plugin. For the iOS platform, the InAppBrowser is implemented using an UIWebView. The "address bar" is a simple UILabel so it is basically read-only from the user's perspective.

I'd like to extend the plugin to have a simple functioning address bar. You know, let the user type in new URLs and show little inline refresh and go buttons. Basically like a regular browser such as Mobile Safari, Chrome, etc.

I know 99 programming languages but Objective-C isn't one. :( Mostly, I don't have experience working with the iOS framework.

These assume too much for me to take action on:

iOS WebView with an Address Bar

Adding a header view to a UIWebView similar to Safari and Articles

I'd like to just modify the PhoneGap plugin iOS source itself so I can keep the plugin hooks it provides to my PhoneGap app's javascript.

Here are the two relevant files:

CDVInAppBrowser.h and CDVInAppBrowser.m on Github

Hopefully this is a welcome challenge to some one already proficient in Objective-C & iOS?

Or maybe you can accelerate me in making the changes myself?

Thanks!!

So you can see what the current UIWebView (with UILabel for Address) looks like:

来源:https://stackoverflow.com/questions/24562732/modify-specific-uiwebview-code-to-have-an-address-bar-similar-to-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!