Display html page in webview and get interact with that html page - iphone

Hi All can some one help me ,I am new to iPhone .
My requirement is I have to display HTML Page in webview .So if i click one button then it should go to another view .So How i can i do it ,

Your button points to a whatever://dosomething URL, and your webview's delegate intercepts this in its webView:shouldStartLoadWithRequest:navigationType: method. Returning NO and doing something based on the URL should allow you to do what you're trying.

Related

How can I detect focus in textfields in a webview using Swift 3?

I am building an application, and when I load a website in webview using Swift 3, the screen will appear like this, now I want to detect when user clicks on the email text field, and add a button to the navigation controller.
I don't know how to do it, does anyone have any idea?
The main use of webview is near like an iframe in web.
I mean that webview is just a displaying of internet content. By this way, you cannot detect any action like user clicks on email textfield.
According to me and currently, there is no possibility to do that because it is not the goal of a webview.

Display a specific Layout in UIWebView

is there any way to display a specific layout of a website in UIWebView? for example in www.google.com. can we display only Google image in UIWebView rather than showing all content of the page like search bar , search button.. etc..
No It is not possible. When you call www.google.com on UIWebView you are displaying web page in your app. And you don't have any control on the content.

Ways of showing a webpage in iPhone?

I have a UIwebview which loads up a page ,first the links in the page were opening up on the same page, that made it look ugly, then I found a function which made the link open up in the phone's safari browser.That was nice but actually I want to show the links in a pop up view which can simply be closed. I have seen the google map popping up and showing the map. I want to do the same same thing with the links on the page they should open up as pop up and should not open up in safari and neither in the same UIWebview.
What could be the possible way to implement this.
Another inspiration is phonegap's ChildBrowser which opens the link as a popup.
I want to implement the same in native.
Any help and suggestions will be appreciated.
You have to use UIWebview to show the web content for the link. just resize it by using frame property as per your requirement because it's inherited by UIView.

fitting the webview page in iPhone without scroll depending upon the data present in a html file

can any one help me..am doing one webview application in iPhone. I am very new to this is technology...my requirement is when am displaying the html content into the webview page depending upon the data the webview page has to fit that means no scrolling comes the page should fix.
Try this Code :
self.myWebView.scalesPageToFit = YES;

How to drag the url in WebView and drop to a textlabel

I have a webview and want to drag the url on the webview to a textlabel.
I know there is the option of 'Copy', but I prefer to do as the dragdrop function in normal computer.
Is this possible for iphone app?
Welcome any comment
Thanks
interdev
I am assuming you want to drag&drop a hyperlink from an HTML page rendered in a UIWebView control to another control on the screen.
Unfortunately I doubt that this is trivial, if at all possible. There is no documented way to find out if a UIControlEventTouchDown event received by a UIWebView object is hitting a rendered hyperlink and discover that hyperlink's URL.
If you were able to do that, you would still have to create and show a custom view that would track touchesMoved and touchesEnded to know when the user drops it, and if it falls on the intended destination control.