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-10-2008, 03:51 PM   #10 (permalink)
Julinar
Registered Member
 
Join Date: Oct 2008
Posts: 8
Default UIWebview transparent background

I had some mixed success with this. Setting the background to transparent in the html code and using a clear bground for the webview, I was able to see the page correctly all the time in the simulator, running 2.1.

If I ran the code on the device, still using 2.1, the webview wouldn't display any contents until I went back a screen, and then reloaded the page. This works everytime, but is clearly not acceptable.

I've tried allocating the webview, setting it to hidden, and then unhiding it when the page has loaded - I can see the NSLog reporting that its loaded, and the view shows up. Then each time I would release the view when done. I've also tried never setting it to hidden - same thing.

I've tried a ton of permutations with the HTML code. I've tried setting the body, html css properties in the <head> to make the background transparent. I've validated the document using strict xhtml standards. I've tried evaluating the document object model property for background as an expression and assigning it that way, and the simple body tag attribute. All produce the same results.

In 2.2, a white background appears when using a transparent background - both on the device, and in the simulator.

Going back to 2.0, I see no diff. between that and 2.1 where this feature is concerned.


Any takers?

EDIT
___________________
The 2.1 solution was to compress the code in the HTML document. I'm not sure why that made a difference with the background -- it always displayed correctly with a color background, just not with transparency.

2.2 still doesn't work.

Last edited by Julinar; 12-10-2008 at 10:56 PM.
Julinar is offline   Reply With Quote
 

» Advertisements
» Online Users: 546
23 members and 523 guests
adamwaite, Bertrand21, crimsoncat, Dani77, dljeffery, Domele, dre, HDshot, HowEver, jakerocheleau, jimbo, john love, Keys, kosicki123, linkmx, macisthegeek, MetaMan, momolgtm, MrBlom, sneaky, Speed, spiderguy84, waq963
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,746
Threads: 89,202
Posts: 380,571
Top Poster: BrianSlick (7,129)
Welcome to our newest member, raKinesic
Powered by vBadvanced CMPS v3.1.0

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