I am using UIwebview .In webview if you longpress on the screen it will show copy,paste popup.I want to add one more option (custom) into that popUp.How to add that and how to handle that.Can any one share the code please.
You can achieve this by handling touch events of your window and also you need to use some javascript functions to Contextual menu in UIWebView. For more about this follow the tutorial - http://www.icab.de/blog/2010/07/11/customize-the-contextual-menu-of-uiwebview/
Related
I was trying to find out how Facebook's application MENU works on iPhone and iPad. Once you press the button at the top left, the main screen moves on the right and the menu appears.
I was trying to create the same menu/effect on xCode but I had no luck.
Do anyone here knows how I can do this? can you redirect me to any website that has that kind of information? Or can you please guide me through on how to make such a menu?
Thanks
the facebook app was created with this open source framework three20
also if you cannot find what you want in the framework, I suggest building your own UI elements inside UIViews, that appear, dissappear as you want,
good luck!
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.
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.
I need to find out how to make the menu that appears in mobile safari on the iphone/touch when you tap & hold an element appear on a single tap without having to hold. how would i do this? preferably i would use webkit & no js.
UIWebView does not does not call any methods until a link is actually activated, and it does not expose any information about its subviews. There is no way to do with current SDK, you should file a bug with Apple if you need this functionality.
is there a way to display a hyperlink in an iPhone native app. Is this done with a label or another UI object?
Thanks!
Joe
Take a look at Three20 TTStyledText class
Create a custom UIButton with only text (no background image) and write an IBAction on its click - you have a hyperlink...
You can embed your text along with hyper link mark ups in a uiwebview object via a static HTML file. Another way is to show the link text on a uibutton and upon click of that button open safari to navigate to the link
I suggest the following solution: Display the htperlink text as a label and put a detailed disclusure button after it. (Detailed disclosure button is an arrowhead in a circle (>). Set the button title to the url, and make an IBAction that handle the click of the button. In this action you can create a new UIWebView, display it and load the URL into it.
There is actually built-in support for this with a UITextView. Check out the accepted answer to this stackoverflow question: How to add hyperlink in iPhone app?