O'Reilly logo

Creating Mobile Apps with Appcelerator Titanium by Christian Brousseau

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

Now we can code

Let's talk about the user interface first.

The user interface

For this application, the user interface is pretty straightforward. As mentioned earlier, we will need to create one view per page, and then delegate the display to the PageFlip component.

Of course, everything has to be contained in a window, so after opening the app.js file and deleting all of its content, we create a standard window using Ti.UI.createWindow with Interactive eBook for iPad as its title. We also store its reference in the win variable for later use, as shown in the following code:

var win = Titanium.UI.createWindow({
    title: 'Interactive eBook for iPad'
});

Importing the PageFlip module

While installing, the module might have seemed complex; using it, on the ...

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