When loading a web page in UIWebView in iphone, the click does not work - iphone

I use and UIWebView in my application to load www.google.com. After the page is loaded, I am not able to click on any of the links. Basically the links dont work. Am I missing something ?

Are user interactions for your UIWebView by any chance not enabled? If you used InterfaceBuilder to create the view check to see if the User Interactions Enabled property for you UIWebView is checked. Programmatically, you can check the userInteractionEnabled property of the web view is set to YES. Also check that interactions are enabled for any parent views that contain your web view.

In UI builder is a checkbox that allows to capture links phone numbers and you have to tick those to enable links ...

Related

Links are not working on UIWebview

In my application, I am using UIWebview to display some url say "Google". The problem is that, it is displaying the web page correctly but the links present on that page are not working.
Say if on Google page I click on map or gmail, then nothing happens. I know, I am missing some minor things, still need help from you.
Check in Interface Builder your .xib with UIWebView, in Attributes Inspector (4th tab of the right panel) in section Web View Detection Links checkbox. It must be checked on in order to make links work.
You also want to make sure that "User interactions Enabled" (in the View section of the attributes tab) is checked.
Make sure your link is constructed exactly like this:
Google
It should just "work".

How detect if user view app in facebook frame or not?

I have disable scroll in my app, so there is only scroll from facebook - it looks cute and I like it, but if came to my app directly on site, there is also no scroll bar. I tried to detect if user load page with url http://mysite.com or http://apps.facebook.com/myapps, in both ways I get the same direct address link, so I cant detect if user view my app via facebook and I need to hide scrollbar or view it on site and I need to show scrollbar. So is there a way to detect how user view my app?
What server side language are you using? If you are inside the facebook iframe, your page will be requested with a post variable set called signed_request. You can check if that has been set in your code, if it has you know you are inside the facebook iframe, if it's not then you are on your site. From here you could either conditionally change your css to allow the content to overflow properly and get scrollbars, or redirect them into the facebook app.

UIWebView not showing the wikipedia search bar

I am using UIWebView to provide a simple browser in an app. When I go to Wikipedia the search bar at top of the page (mobile version) is never shown in the UIWebView. Scrolling down and back up does not make it visible.
I tried both cases (YES/NO) for scalesPageToFit but did not do anything.
The problem is that Wikipedia is reading the user agent string and deciding not to show the search bar. (UIWebView's user agent is slightly different than mobile Safari's user agent.) Unfortunately, it looks like you cannot change the user agent string used by UIWebView.

changing the options displayed in uiwebview for link

Is that possible to display options in uiwebview links. When you touch and hold a 3 options come up, (open, copy and cancel). Is there a way to add a option say "open in safari browser", so that the user can open it either in safari or in the app's embedded browser ?
You could use the webView:shouldStartLoadWithRequest:navigationType: callback of webview delegate to add your custom behaviour.

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.