简体   繁体   English

如何在应用程序中添加超链接?

[英]How do I add a hyperlink in my app?

I've tried a number of methods: 我尝试了多种方法:

  • A UIWebView doesn't do the trick because I've got a textured background, and the UIWebView doesn't do transparent backgrounds. UIWebView不能解决问题,因为我有带纹理的背景,而UIWebView却没有透明背景。
  • A UITextView - seems like a really good option. UITextView-似乎是一个很好的选择。 I've got it auto detecting my hyperlink, but it overrides my link colour with blue. 我可以自动检测到我的超链接,但是它会用蓝色覆盖我的链接颜色。 :( :(
  • I've looked at the Three20 code - this looks overly complex. 我看过Three20代码-这看起来过于复杂。

I was thinking, is there a way to make a UIButton look like text? 我在想,有没有办法使UIButton看起来像文本? This'd probably be perfect. 这可能是完美的。

This is really annoying, seems that almost every app does this, yet I can't find out how it's done. 这确实很烦人,似乎几乎每个应用程序都可以做到这一点,但我无法确定它是如何完成的。

UIWebView does allow transparent backgrounds. UIWebView 确实允许透明背景。

I use this in my app, Pocket Tabs . 我在我的应用程序Pocket Tabs中使用它。

webView.opaque = NO;
webView.backgroundColor = [UIColor clearColor];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM