iPhone OS Reference Library Apple Developer Connection spyglass button

Version: 1.0

Posted: 2009-04-12

Build Requirements: Mac OS X 10.5.3, Xcode 3.1, iPhone OS 2.0.

Runtime Requirements: Mac OS X 10.5.3, iPhone OS 2.0.

View Source Code:

Download Sample Code (“TransWeb.zip”, 298.2K)



Description

Demonstrates how to implement UIWebView with a transparent background.

To achieve this you need to make the HTML body's background color transparent by doing the following -

1) set the UIWebView's backgroundColor property to [UIColor clearColor]

2) use the UIWebView's content in the html: <body style="background-color: transparent">

3) the UIWebView's opaque property set to NO

Document Revision History

Date Notes
2009-04-12Demonstrates how to implement UIWebView with a transparent background.
Did this document help you? Yes It's good, but... Not helpful...