Although Appcelerator Titanium makes much of the hard work of integrating numerous operating systems and devices invisible to you, the developer, there are going to be times when you simply have to write some code that is platform-specific. The most common way of doing this is by checking the
osname property from the
In this recipe, we will create a simple screen that shows a custom activity indicator when the device is an iPhone, and a standard indicator when the user is using an Android device.
Again, the complete source code for this recipe can be found in the
/Chapter 11/Recipe 4 folder.
app.js file, remove any existing code, and type ...