SriKanth
SriKanth

Reputation: 459

How to remove the background color of HTML file loaded using UIWebview in iPhone

I have an HTML file in my bundle.. I am loading it using webView... Then i am getting a white background color(I think It may be the background color of HTML file).. How can i remove that background when it appears on iPhone...

Question2: I want to use that HTML file for iPhone and iPad with different font sizes.. I have 20 HTML files.. For example the font size of text in HTML is 15... That size is enough for iPhone but For iPad it is looking very small... How can i change the font size of text in HTML file dynamically using iPhone code...

Upvotes: 0

Views: 724

Answers (1)

Manuel
Manuel

Reputation: 10303

Try setting the background color of your uiview to clear like so:

uiwebview.backgroundColor = [UIColor clearColor];

And change the body tag to this (or add it to your CSS):

<body style="filter: alpha (opacity=0)">

Upvotes: 1

Related Questions