I have a table with two UITableViewCell (and one label on each).
The idea is to implement the classical About page with a link to the app web and a link to the support email.
This is how it looks like:
Image here: http://dl.dropbox.com/u/3930527/Xcode002.jpg
I’ve been looking around as usual before coming here and ask for help, but again, as usual, so many weird and complex solutions to implement something that my guts tell me must be way easier.
I’m not sure if the way to go is to make the labels linkable. Since I have user interaction enabled on the cells I think it is natural to use that event to fire [b]Safari[/b] for row 1 and [b]Mail[/b] for row 2.
Am I correct? Is there a recommended way to do that?
To open a URL in safari, you can use the UIApplication#openURL method. You can also use this same method to open mail, using a
mailto:link.And arguably better solution to your support email question would be to present the ‘compose new email’ screen modally within your app, which is pretty easy to do.
First you’ll need to add the
MessageUIframework to your app, and also make your table view controller respondMFMailComposeViewControllerDelegate.Then, instead of the call to UIApplication above, do something along these lines:
This will present the ‘compose new email’ modal, and keep users inside your app, rather than switching out to Mail itself. You’ll also need to handle the following delegate method, so that you can hide the modal once the user is done: