views:

253

answers:

1

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.
  • A UITextView - seems like a really good option. 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.

I was thinking, is there a way to make a UIButton look like text? 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.

+6  A: 

UIWebView does allow transparent backgrounds.

I use this in my app, Pocket Tabs.

webView.opaque = NO;
webView.backgroundColor = [UIColor clearColor];
Ben Scheirman
Brilliant! I'm such an idiot! All I need to do now then, is work out how to override the hyperlink action on pressing of the link :)
mac_55
You can do that to! Add a custom scheme (like http:, but your own) and then handle the webView delegate method:- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationTypeand check for your custom scheme. Don't think you're an idiot, I'm finding myself facepalm on silly things all the time. A 2nd pair of eyes really helps.
Ben Scheirman