-
Book Overview & Buying
-
Table Of Contents
Creating Mobile Apps with Appcelerator Titanium
By :
Let's talk about the user interface first.
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'
});While installing, the module might have seemed complex; using it, on the other hand, is quite simple. Once a module is installed and configured for a project, we can invoke it just as we would invoke any other CommonJS component.
var PageFlip = require('ti.pageflip');Thereafter, every time...
Change the font size
Change margin width
Change background colour