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

Building the duo navigation buttons

Another important navigation widget for the graphical user interface of our iPhone applications is the duo buttons. These buttons allow us to go to different pages. It's also is possible to use these buttons as triggers for actions. For instance, one of these buttons can be used for cancelling an action. Let's show how to build this navigation widget.

Getting ready

The iWebKit framework provides a good set of navigation widgets, so we'll use this one again.

How to do it...

The process for building this navigation widget is very simple; you only need to create a div element with a specific CSS class and add two links inside it. Take your work file for the iWebKit and replace its content with the following lines ...

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