2013-03-05 36 views
1

在我的申請,我通過使用Web服務JSON,在檢索它包含了像一些URL鏈接:的WebView字符串定製

Enfim, aqui vai a review![youtube]http:\/\/youtu.be\/HFn_IRLEAOA<\/a>[\/youtube] 

我想表明,特定的你管的鏈接爲:

"Please click here to see" 

由於我使用的代碼爲您除去如下:

NSString *replac1=[replac stringByReplacingOccurrencesOfString:@"[youtube]" withString:@""]; 
    NSString *replac2=[replac1 stringByReplacingOccurrencesOfString:@"[/youtube]" withString:@""]; 
    NSString *replac3=[replac2 stringByReplacingOccurrencesOfString:@"[youtube ]" withString:@""]; 

如何添加「請點擊此處查看」而不是鏈接值?請幫我解決。

回答

1

這可能會幫助你:

NSString *html = @"<a href=\"http://www.youtube.com/watch?v=pii4G8FkCA4/\">Please click here to see</a>"; 
[webview loadHTMLString:html baseURL:nil];