Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-04-2008, 12:36 AM   #9 (permalink)
Glass
Registered Member
 
Join Date: Oct 2008
Posts: 80
Default

Quote:
Originally Posted by csmithmaui View Post
I just made a webview transparent the other day.

Here is what I did:
first set the background color of the webview to clear:
myWebView.backgroundColor = [UIColor clearColor];

then in your html file use css syntax:
<body style="background-color:transparent">

I actually did it in the <head> section but that should work too.
Hope that helps you...it worked for me.

csmithmaui
Does this still work in 2.2? I tried it in the simulator and on the device, I can't get it to work on any of them.

I got:
Code:
[self setHeaderStr:[[NSMutableString alloc] initWithString:@"<html>...<body style=\"background-color:transparent;\">"]];
Code:
[webView setBackgroundColor:[UIColor clearColor]];
[webView setDelegate:self];
[webView loadHTMLString:[NSString stringWithFormat:@"%@%@", headerStr, bodyStr] baseURL:[NSURL URLWithString:@"..."]];
Glass is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,720
Threads: 89,177
Posts: 380,485
Top Poster: BrianSlick (7,120)
Welcome to our newest member, MINCHEW
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:14 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.