Update tab icon badge in iPhone app using Titanium

Using Titanium by Appcelerator is a very effective way to develop quite standard app for iPhone using a fraction of time and effort (if compared to standard iPhone development).

Using Titanium you can develop app for iPhone using Javascript as your language and some notation that are very similar to css for decorating your app or defining classes properties.

Today I want to share a simple way to display the red circle with the number (the badge!) that you see on some tab icon applications, when you have news happening there

(yeah those cute red circles!)

in Titanium, to accomplish that is as simple as writing:

var yourtab = titanium.ui.createtab;
yourtab.badge = 3; // the tab badge will be set to 3, strange uh? :)

That’s all for today.

This entry was posted in iPhone, Titanium. Bookmark the permalink.

Comments are closed.