Custom background color

If you want more, look at my new blog!

If you want to modify the background color of the Web view, not the background color of the HTML page but the default gray one “under” it, just open the PhoneGapLib.xcodeproj into your Documents (or wherever you put it) and edit PhoneGapDelegate.m at aline 160 and add, after:

webView = [ [ UIWebView alloc ] initWithFrame:screenBounds ];
[webView setAutoresizingMask: (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight) ];

this line:
[webView setBackgroundColor:[UIColor blackColor]];

Now your background is black!

This entry was posted in iPhone, Objective C, Phonegap, User Interface and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s