Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-03-2008, 11:36 PM   #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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,344
Threads: 39,137
Posts: 171,591
Top Poster: smasher (2,577)
Welcome to our newest member, totti_c
Powered by vBadvanced CMPS v3.1.0

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