如何在我的应用中添加超链接?

时间:2022-10-31 22:05:07

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. I've got it auto detecting my hyperlink, but it overrides my link colour with blue. :(
  • UITextView - 似乎是一个非常好的选择。我已经让它自动检测我的超链接,但它用蓝色覆盖了我的链接颜色。 :(

  • 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? This'd probably be perfect.

我在想,有没有办法让UIButton看起来像文字?这可能是完美的。

This is really annoying, seems that almost every app does this, yet I can't find out how it's done.

这真的很烦人,似乎几乎每个应用程序都这样做,但我无法弄清楚它是如何完成的。

1 个解决方案

#1


7  

UIWebView does allow transparent backgrounds.

UIWebView确实允许透明背景。

I use this in my app, Pocket Tabs.

我在我的应用程序Pocket Tabs中使用它。

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

#1


7  

UIWebView does allow transparent backgrounds.

UIWebView确实允许透明背景。

I use this in my app, Pocket Tabs.

我在我的应用程序Pocket Tabs中使用它。

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