2012-10-04 60 views
0
打開可點擊網址

我使用的代碼如何MFMailComposer

if ([MFMailComposeViewController canSendMail]) 
     { 
      MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; 
      picker.mailComposeDelegate = self; 
      [picker setSubject:@"Check out"]; 
      UIImage *morphedImage = [sharedSingleton getCopy]; 
      NSData *myData = UIImagePNGRepresentation(morphedImage); 
      [picker addAttachmentData:myData mimeType:@"image/png" fileName:@"RaceFaceImage"]; 
      [picker setMessageBody:@"I've given you a new look using my RaceFace iPhone application. Check it out and have a good laugh. I dare you to Race me, download the app here:<b>Sourish</b><a href='www.google.com'>itunesLink</a>" isHTML:YES]; 
      [self presentModalViewController:picker animated:YES]; 
      [picker release]; 
     } 
     else 
     { 

     } 

我得到O /引腳這種方式下面的一段 MailCOmposer Output

我想就像我的藍色文字點擊particualr你應該打開,我該怎麼做?

幫助的任何一種是高度有用
感謝和問候

回答

0

使用此代碼

NSString *link = [NSString stringWithFormat:@"http://www.google.com"]; 
      [controller setMessageBody:[NSString stringWithFormat:@"<p><font size=\"2\" face=\"Helvetica\"><a href=%@></br>%@</br></a></br></font></p>",link,@"Google"] isHTML:YES]; 

希望它可以幫助你....

+0

嘿Prateek我試圖與代碼\它不工作的所有這一切發生的是現在我不能把光標移到谷歌文本的中間,我想當我點擊谷歌文本谷歌鏈接應該打開 – iYahoo

+0

如果你打開郵件作曲家,它會永遠不會k,嘗試發送郵件,然後點擊該鏈接... –

+0

是啊,當我發送郵件,在收件箱中,當我點擊它時,它被打開,但我的要求就像打開mailComposer它已經去鏈接 – iYahoo

相關問題