1

I am displaying a HTML page in my iPhone app. The HTML page has few Email addresses. In Mac desktop browser, if the same HTML page is opened and if i click on email address, MAC machines mailbox is opened to compose a new email. Whereas in iPhone, on clicking the email address it is trying to load the webView thinking it as a link.

How come it is working on MAC browser and not in iPhone app.

Source in HTML is :

<a href="mailto:customerinfo@mycompany.com">customerinfo@mycompany.com</a>

If i try to handle using MFMailControlViewController, it works. But my real question is, how come MAC desktop launching mail box and iPhone doesn't.

Thanks Jithen

4

1 回答 1

4

转到界面构建器到 Web 视图设置。您需要启用地址和链接检测。

在界面生成器中设置 webView

或者

在代码中:

webView.dataDetectorTypes = UIDataDetectorTypeAll;
于 2013-07-15T07:30:12.770 回答