iPhone Cocoa hyperlink - iphone

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?

Related

lightweight implementation of textview with links?

Is there any lightweight implementation of text with links (highlighted text associated with a uri which a user can click on) on ios? Webview would be too complicated. And I don't want to be using three20 either.
You can implement text with link in following way:
1) Just display the text in label.
2) And take one button on label, set it's property as "Custom Button". So that, text will be displayed.
3) Implement click event of button. And open the url which you want to open.
Hope it will be helpful to you.
Let me know in case of any difficulty.

iphone, how to create Combobox like in this image (Birthday combo box)

How can i display combo box like the one you see in the image (Birthday combobox) on this site:
http://www.edumobile.org/iphone/iphone-programming-tutorials/how-to-use-picker-in-iphone/
Is it UITextField or UIButton... How can i create such control?
I think it's a custom button with image that looks like combobox. pressing it opens probably a date picker. You need an image that looks like combobox and to customize your table cell appearance - add a button as accessory view or create a custom cell in IB
You are referring to the screenshot at the top of the article ?
To me it looks like the app is either a WebView or has manually created button image ... to my knowledge there is no native Combo buttons in the UIKit.
Sorry to share the bad news.
Good Luck

In the iOS SDK, how can I include a button in a UITextField like Mobile Safari does?

How can I display a button and/or activity indicator inside of a UITextField on the iPhone? I'm trying to reproduce Mobile Safari's location text field which contains either a reload button or a cancel (stop loading) button which is right-justified inside of the text field.
Similarly, when you click inside of the text field (not on the cancel/reload buttons) to edit the URL, a clear icon (x inside of a circle) is shown inside of the text field which will erase the contents of the text field.
How can I create this in my own apps? I cannot seem to do it via Interface Builder so I suspect it's being done in code.
There is a built in option that worked for me...check here:
Adding the "Clear" Button to an iPhone UITextField
Check out TTMessageController.

UIWebView action sheet popup on a link - customization

I'm trying to replace or add more options into the action sheet popup in uiwebview. When touching long touch on a link standard uiwebview popup shows up. I saw some apps which did it, but i can't figure it out.
the standard options are : open or copy, i want to hide copy and add send email.
Any help ?
Thanks
Albert
That "action" popup can be disabled in a UIWebView by setting the CSS class -webkit-touch-callout: none or by setting document.documentElement.style.webkitTouchCallout = "none"; in javascript.
Once you disable the default behavior you can create any custom action sheet you'd like.
You want to customize the UIMenuItems of the UIMenuController. I explain how to do this here: Customize UIMenuController

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.