Before writing any code
As mentioned earlier in this chapter, Titanium does not provide any means to give a nice curly effect to the pages while swiping our finger across the screen. There are two ways around this:
- Develop the desired effect using JavaScript by playing with canvas, rotations, and animations. Such an approach would require some fairly complex code and there is also the risk that the performance may be poor depending on the use cases.
- Use a piece of software that uses native code to achieve the desired effect, but still allows us to use it with JavaScript, similar to other Titanium components such as
Button
,Label
,View
, and so on. This piece of software is a called aTitanium Native
module.
A native module
When using a framework, there will come a time when you will need more than what it has to offer. This may happen progressively as you use the framework more often. The engineers behind Titanium, keeping this in mind, allowed the developers to extend Titanium using native...