Chapter 12

Settings and User Management

THE SETTINGS TAB is the final tab in the application. This tab allows the user to perform the following functions. This is not an exhaustive list of settings for an application like this but it gives you an idea of what can be accomplished using the Appcelerator framework and Appcelerator Cloud Services.

  • View and update the photo associated with the account
  • View the count of friends and followers
  • View the count of photos uploaded
  • Turn off friends’ push notification
  • Log in/out of Facebook
  • Log in/out of Twitter

Most of these features will be implemented by enhancing code that has already been written to provide you with additional information. There will be some enhancement to the share library and the push notifications library as well as an introduction to a JavaScript library q that can resolve common issues found when developing code with a lot of asynchronous callbacks.

Getting Started: View, Style, Controller

By now the process for creating windows for applications using the Alloy Framework should be pretty familiar to you. Let’s start by opening the settings.xml view file and adding the code to construct the user interface to match the wireframes created in the earlier chapters.

Editing the View

First you will need to add the Logout button to the title bar for the iOS version of the application; remember when adding platform-specific code, you will need to specify the platform attribute in the view element. As a child of the window ...

Get Building Cross-Platform Apps using Titanium, Alloy, and Appcelerator Cloud Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.