How do i make a UILabel act as a link?

Posted by user2918086 on Stack Overflow See other posts from Stack Overflow or by user2918086
Published on 2013-10-25T15:41:45Z Indexed on 2013/10/25 15:54 UTC
Read the original article Hit count: 146

Filed under:

I have built a "teacher directory" of sorts, i have the data fill into 3 fields, name, position, and email. All of the fields are UILabels. How do i make it so that you can click on the email and it opens a blank email?

    @interface PersonDetailTableViewController ()

@end

@implementation PersonDetailTableViewController

@synthesize fnameLabel, snameLabel, emailLabel, person;

- (void)viewDidLoad
{
    [super viewDidLoad];

    [super viewDidLoad];

    self.fnameLabel.text = self.person.fname;
    self.snameLabel.text = self.person.sname;
    self.emailLabel.text = self.person.email;
}

(this is the table view controller where the data is being displayed)

© Stack Overflow or respective owner

Related posts about email