O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying the default status bar

If you take a look at the application running in your iPhone device, you'll see a small, thin, and light gray bar at the top of the screen. This is the status bar and it shows information, such as the current time, the status of the battery, and the name of the carrier. In this recipe, we'll learn how to modify the default status bar of the iPhone.

Getting ready

For this recipe, we don't need any framework as we can use one of the native properties of the Safari Mobile web browser installed in the device.

How to do it...

We only need to add one line in the meta section of the HTML file. Instead of creating a new file, you can reuse the file used for the previous recipe. To change the background color to black, we'll ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required