<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cssgallery.info &#187; iPhone</title>
	<atom:link href="http://cssgallery.info/category/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://cssgallery.info</link>
	<description>Resources for web developers</description>
	<lastBuildDate>Sun, 11 Jul 2010 16:19:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Kids-apps.mobi &#8211; our new showroom for kids applications</title>
		<link>http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/</link>
		<comments>http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 22:56:10 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Gallery]]></category>
		<category><![CDATA[Submitted news]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[children applications]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[edu]]></category>
		<category><![CDATA[educational]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[iPad apps]]></category>
		<category><![CDATA[iPhone apps]]></category>
		<category><![CDATA[kids applications]]></category>
		<category><![CDATA[the best applications]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1268</guid>
		<description><![CDATA[We just launched <strong><a href="http://kids-apps.mobi" rel="us">kids-apps.mobi</a></strong>, a showroom dedicated  to gathering in one place iPad and iPhone/iPod touch applications for children.

It intends to be a <strong>collection of only the best applications for your kids</strong>  offering a easy way to find what you are looking for without the need of searching the entire Appstore for this.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fkids-apps-mobi-our-new-showroom-for-kids-applications%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fkids-apps-mobi-our-new-showroom-for-kids-applications%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We just launched <strong><a href="http://kids-apps.mobi" rel="us">kids-apps.mobi</a></strong>, a showroom dedicated  to gathering in one place iPad and iPhone/iPod touch applications for children.</p>
<p>It intends to be a collection of only the best applications for your kids  offering a easy way to find what you are looking for without the need of searching the entire Appstore for this.</p>
<p><img src="http://www.cssgallery.info/wp-content/uploads/2010/06/capture-1-e1276285926661.png" alt="kids-apps.mobi" title="kids-apps.mobi" width="650" height="361" class="alignnone size-full wp-image-1269" /></p>
<h2>Upload your kids application</h2>
<p>So if you have launched an application and would like to show in the <strong><a href="http://kids-apps.mobi">kids-apps.mobi</a></strong> website, drop us a line using the form <a href="http://kids-apps.mobi/upload-your-application/">here</a>. </p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications&amp;description=We%20just%20launched%20kids-apps.mobi%2C%20a%20showroom%20dedicated%20%20to%20gathering%20in%20one%20place%20iPad%20and%20iPhone%2FiPod%20touch%20applications%20for%20children.%0D%0A%0D%0AIt%20intends%20to%20be%20a%20collection%20of%20only%20the%20best%20applications%20for%20your%20kids%20%20offering%20a%20easy%20way%20to%20find%20what%20you%20are%20looking%20for%20without%20the%20need%20of%20searching%20the%20entire%20Appstore%20for%20this." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;t=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;title=Kids-apps.mobi+-+our+new+showroom+for+kids+applications&amp;srcUrl=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/&amp;srcTitle=Kids-apps.mobi+-+our+new+showroom+for+kids+applications&amp;snippet=We%20just%20launched%20kids-apps.mobi%2C%20a%20showroom%20dedicated%20%20to%20gathering%20in%20one%20place%20iPad%20and%20iPhone%2FiPod%20touch%20applications%20for%20children.%0D%0A%0D%0AIt%20intends%20to%20be%20a%20collection%20of%20only%20the%20best%20applications%20for%20your%20kids%20%20offering%20a%20easy%20way%20to%20find%20what%20you%20are%20looking%20for%20without%20the%20need%20of%20searching%20the%20entire%20Appstore%20for%20this." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/kids-apps-mobi-our-new-showroom-for-kids-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fairy Tales for iPad &#8211; our ebook app</title>
		<link>http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/</link>
		<comments>http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 09:35:09 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[4 volumes]]></category>
		<category><![CDATA[62 stories]]></category>
		<category><![CDATA[accessible]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[bedtime stories]]></category>
		<category><![CDATA[Brothers Grimm]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[Fairy Tales]]></category>
		<category><![CDATA[night mode]]></category>
		<category><![CDATA[usable]]></category>

		<guid isPermaLink="false">http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/</guid>
		<description><![CDATA[We have launched the first ebook "Fairy Tales" by Brothers Grimm which contains a set of 62 beautiful bedtime stories. 
It is built as an iPad application available for <a href="http://itunes.apple.com/us/app/fairy-tales-by-brothers-grimm/id372644425?mt=8">download on Appstore</a>.

The application has a beautiful and usable interface  allowing the user to choose the font, the size of the text and to switch to night-mode for a better reading experience during the night. It saves your current reading position in realtime so you can close the ebook at anytime and return to reading it later.

<object width="420" height="300"><param name="movie" value="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="420" height="300"></embed></object>

]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Ffairy-tales-for-ipad-our-ebook-app%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Ffairy-tales-for-ipad-our-ebook-app%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We have launched the first ebook &#8220;Fairy Tales&#8221; by Brothers Grimm which contains a set of 62 beautiful bedtime stories.<br />
It is built as an iPad application available for <a href="http://itunes.apple.com/us/app/fairy-tales-by-brothers-grimm/id372644425?mt=8">download on Appstore</a>.</p>
<p><object width="600" height="400"><param name="movie" value="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KzkHVOlR6jw&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="400"></embed></object></p>
<p>The application has a beautiful and usable interface  allowing the user to choose the font, the size of the text and to switch to night-mode for a better reading experience during the night. It saves your current reading position in realtime so you can close the ebook at anytime and return to reading it later.</p>
<h2>Chapter 1 stories</h2>
<ul>
<li>Ashputtel</li>
<li>Briar Rose</li>
<li>Cat and mouse in partnership</li>
<li>Cat-skin</li>
<li>Clever Elsie</li>
<li>Clever Gretel</li>
<li>Clever Hans</li>
<li>Doctor Knowall</li>
<li>Frederick and Catherine</li>
<li>Fundevogel</li>
<li>Hans in luck</li>
<li><strong>Hansel and Gretel</strong></li>
<li>Iron Hans</li>
<li>Jorinda and Jorindel</li>
<li>King Grisly-beard</li>
</ul>
<h2>Chapter 2 stories</h2>
<ul>
<li>Lily and the lion</li>
<li><strong>Little red riding hood</strong></li>
<li>Mother Holle</li>
<li>Old sultan</li>
<li>Rapunzel</li>
<li>Rumpelstiltskin</li>
<li>Snow-white and Rose-red</li>
<li>Snowdrop</li>
<li>Sweetheart Roland</li>
<li>The 4 clever brothers</li>
<li>The 7 ravens</li>
<li>The 12 dancing princesses</li>
<li>The 12 huntsmen</li>
<li>The adventures of Chanticleer and Partlet</li>
<li>The blue heart</li>
</ul>
<h2>Chapter 3 stories</h2>
<ul>
<li>The dog and the sparrow</li>
<li>The elves and the shoemaker</li>
<li>The fisherman and his wife</li>
<li>The fox and the cat</li>
<li>The fox and the horse</li>
<li><strong>The frog-prince</strong></li>
<li>The golden bird</li>
<li>The golden goose</li>
<li>The goose-girl</li>
<li>The juniper-tree</li>
<li>The king of the golden mountain</li>
<li>The little peasant</li>
<li>The miser in the bush</li>
<li>The mouse, the bird and the sausage</li>
<li>The old man and his grandson</li>
<li>The pink</li>
</ul>
<h2>Chapter 4 stories</h2>
<ul>
<li>The queen bee</li>
<li>The raven</li>
<li>The robber bridegroom</li>
<li>The salad</li>
<li>The story of the youth who went forth to learn what fear was</li>
<li>The straw the coal and the bean</li>
<li>The three languages</li>
<li>The travelling musicians</li>
<li>The turnip</li>
<li><strong>The valiant little tailor</strong></li>
<li>The water of life</li>
<li>The wedding of mister Fox</li>
<li>The white snake</li>
<li>The willow-wren and his bear</li>
<li>The wolf and the seven little kids</li>
<li><strong>Tom thumb</strong></li>
</ul>
<p><strong class="spanish">Check the Spanish version of this post:<br />
 <a href="http://nosoloweb.es/cuentos-de-hadas-para-ipad-nuestra-aplicacion-ebook/" rel="me">Cuentos de Hadas para iPad – nuestra aplicación ebook</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app&amp;description=We%20have%20launched%20the%20first%20ebook%20%22Fairy%20Tales%22%20by%20Brothers%20Grimm%20which%20contains%20a%20set%20of%2062%20beautiful%20bedtime%20stories.%20%0D%0AIt%20is%20built%20as%20an%20iPad%20application%20available%20for%20download%20on%20Appstore.%0D%0A%0D%0AThe%20application%20has%20a%20beautiful%20and%20usable%20interface%20%20allowing%20the%20user%20to%20choose%20the%20font%2C%20the%20size%20of%20the%20text%20and%20to%20switch%20to%20night-mode%20for%20a%20better%20reading%20experience%20during%20the%20night.%20It%20saves%20your%20current%20reading%20position%20in%20realtime%20so%20you%20can%20close%20the%20ebook%20at%20anytime%20and%20return%20to%20reading%20it%20later.%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;t=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;title=Fairy+Tales+for+iPad+-+our+ebook+app&amp;srcUrl=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/&amp;srcTitle=Fairy+Tales+for+iPad+-+our+ebook+app&amp;snippet=We%20have%20launched%20the%20first%20ebook%20%22Fairy%20Tales%22%20by%20Brothers%20Grimm%20which%20contains%20a%20set%20of%2062%20beautiful%20bedtime%20stories.%20%0D%0AIt%20is%20built%20as%20an%20iPad%20application%20available%20for%20download%20on%20Appstore.%0D%0A%0D%0AThe%20application%20has%20a%20beautiful%20and%20usable%20interface%20%20allowing%20the%20user%20to%20choose%20the%20font%2C%20the%20size%20of%20the%20text%20and%20to%20switch%20to%20night-mode%20for%20a%20better%20reading%20experience%20during%20the%20night.%20It%20saves%20your%20current%20reading%20position%20in%20realtime%20so%20you%20can%20close%20the%20ebook%20at%20anytime%20and%20return%20to%20reading%20it%20later.%0D%0A%0D%0A%0D%0A%0D%0A" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/fairy-tales-for-ipad-our-ebook-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a combo-box in Titanium Appcelerator &#8211; code and video</title>
		<link>http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/</link>
		<comments>http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/#comments</comments>
		<pubDate>Sat, 29 May 2010 10:08:12 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[getSelectedRow]]></category>
		<category><![CDATA[iphone combobox]]></category>
		<category><![CDATA[iphone tutorial]]></category>
		<category><![CDATA[picker_view]]></category>
		<category><![CDATA[textField]]></category>
		<category><![CDATA[titanium appcelerator combobox]]></category>
		<category><![CDATA[titanium tutorial]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1221</guid>
		<description><![CDATA[A true iPhone or Ipad combobox that allows you to use  the same textfield to input arbitrary text or select a value from a UIPicker element. All built with Titanium Appcelerator to include in your iPhone application.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fmaking-a-combo-box-in-titanium-appcelerator-code-and-video%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fmaking-a-combo-box-in-titanium-appcelerator-code-and-video%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes we need a true combobox for our projects but iPhone SDK does not have a native one (at least from what I know)  and  of course neither has Titanium. </p>
<p>So we will build one. A &#8220;true&#8221; iPhone or Ipad combobox that allows you to use  the same textfield to input arbitrary text or select a value from a UIPicker element.</p>
<p>Updated with <a href="http://twitter.com/CJ_Reed">@CJ_Reed&#8217;s</a> screenshot and code at the final of the tutorial.</p>
<p>Let&#8217;s see the video first, then we&#8217;ll get to work:</p>
<p><object width="650" height="400"><param name="movie" value="http://www.youtube.com/v/2H-w_hUQtPw&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2H-w_hUQtPw&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="650" height="400"></embed></object></p>
<h2>Ok, what do we need for this iPhone combobox ?</h2>
<p>First of all we need a <strong>textField</strong> to accept input from the user. Titanium lets you set the <strong>leftButton</strong> and <strong>rightButton</strong> for this <strong>textField</strong> while constructing it. So we will take advantage of this and create a textField as it follows:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_combo <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTextField</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	hintText<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;write your name or select one&quot;</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">300</span><span style="color: #339933;">,</span>
	top<span style="color: #339933;">:</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span>
	borderStyle<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">INPUT_BORDERSTYLE_ROUNDED</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Nothing special, a regular <strong>textField</strong> with a hint for the user  that will disappear when the <strong>textField</strong> has a value.</p>
<p>Now we need to create the <strong>rightButton</strong> for it.</p>
<p>We will  use a system button provided by Apple (<strong>Titanium.UI.iPhone.SystemButton.DISCLOSURE</strong>)  only that we will rotate it 90 degrees to server our purpose. This is the code that creates the <strong>rightButton</strong> and the transformation applied to it.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> tr <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">create2DMatrix</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
tr <span style="color: #339933;">=</span> tr.<span style="color: #660066;">rotate</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">90</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> drop_button <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		style<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButton</span>.<span style="color: #660066;">DISCLOSURE</span><span style="color: #339933;">,</span>
		transform<span style="color: #339933;">:</span>tr
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now that we have the <strong>rightButton</strong> as we need it, the <strong>textField</strong> constructor becomes:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_combo <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTextField</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	hintText<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;write your name or select one&quot;</span><span style="color: #339933;">,</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
	width<span style="color: #339933;">:</span><span style="color: #CC0000;">300</span><span style="color: #339933;">,</span>
	top<span style="color: #339933;">:</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span>
	borderStyle<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">INPUT_BORDERSTYLE_ROUNDED</span><span style="color: #339933;">,</span>
	rightButton<span style="color: #339933;">:</span>drop_button<span style="color: #339933;">,</span>
	rightButtonMode<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">INPUT_BUTTONMODE_ALWAYS</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Please note the <strong>rightButtonMode:Titanium.UI.INPUT_BUTTONMODE_ALWAYS</strong> declaration, it makes this button visible all the time.</p>
<p>This is how it looks:</p>
<p><img class="alignnone size-full wp-image-1223" title="iPhone combobox with Titanium" src="http://cssgallery.info/wp-content/uploads/2010/05/capture-11.png" alt="iPhone combobox with Titanium" width="400" height="83" /></p>
<p>Pretty sexy, isn&#8217;t it? Well we&#8217;re not done yet.</p>
<h2>Building the modal picker</h2>
<p>When the user focuses on the <strong>textField</strong>, the keyboard appears &#8211; so we will have to build our <strong>picker</strong> to emulate the same behaviour and to maximize the usability of our form. For this we will need a <strong>Picker</strong>  and two buttons: <strong>Done</strong> and <strong>Cancel</strong>. These two buttons will be positioned in a <strong>Toolbar</strong>, again, to  emulate as good as possible the keyboard behaviour.</p>
<p>Let&#8217;s build everything:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> picker_view <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	height<span style="color: #339933;">:</span><span style="color: #CC0000;">251</span><span style="color: #339933;">,</span>
	bottom<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> cancel <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Cancel'</span><span style="color: #339933;">,</span>
	style<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButtonStyle</span>.<span style="color: #660066;">BORDERED</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> done <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Done'</span><span style="color: #339933;">,</span>
	style<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButtonStyle</span>.<span style="color: #660066;">DONE</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> spacer <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	systemButton<span style="color: #339933;">:</span>Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">iPhone</span>.<span style="color: #660066;">SystemButton</span>.<span style="color: #660066;">FLEXIBLE_SPACE</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> toolbar <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createToolbar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	top<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
	items<span style="color: #339933;">:</span><span style="color: #009900;">&#91;</span>cancel<span style="color: #339933;">,</span>spacer<span style="color: #339933;">,</span>done<span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> picker <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPicker</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		top<span style="color: #339933;">:</span><span style="color: #CC0000;">43</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
picker.<span style="color: #660066;">selectionIndicator</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> picker_data <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'John'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Alex'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Marie'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'Eva'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createPickerRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span><span style="color: #3366CC;">'James'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
picker.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>picker_data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
picker_view.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>toolbar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
picker_view.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>picker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The code is a little long but is not rocket science. Some stuff to talk about though:</p>
<ul>
<li>Everyting is wrapped inside a view &#8211; <strong>picker_view</strong> &#8211;  because we will have to animate like the keyboard does, so it&#8217;s faster to animate one element only.</li>
<li>The height of <strong>picker_view</strong> is the height of the <strong>toolbar</strong> (43px) + the height of the <strong>picker</strong> (208px). How do I know this? I just used a ruler <img src='http://cssgallery.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  </li>
</ul>
<p>The combobox interface looks like this:</p>
<p><img class="alignnone size-full wp-image-1226" title="picker Titanium for combobox" src="http://cssgallery.info/wp-content/uploads/2010/05/capture-2.png" alt="picker Titanium for combobox" width="326" height="465" /></p>
<h2>Creating the picker animation</h2>
<p>We also need to create 2 animations: <strong>slide_in</strong> and <strong>slide_out</strong>. We will animate the <strong>bottom</strong> property of the <strong>picker_view</strong>. We will need to start with the <strong>picker_view</strong> off the screen, so we will build it with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> bottom<span style="color: #339933;">:-</span><span style="color: #CC0000;">251</span></pre></div></div>

<p>instead of 0 as it was initially.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> slide_in <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAnimation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>bottom<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> slide_out <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAnimation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>bottom<span style="color: #339933;">:-</span><span style="color: #CC0000;">251</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The logic behind the animations is this:</p>
<ul>
<li>The user focuses the <strong>textField</strong> &#8211;  the keyboard appears ( it&#8217;s done by the OS , no worries here) and if the <strong>picker_view</strong> is visible we need to hide it.</li>
<li>The user clicks the <strong>rightButton</strong> &#8211; we need to hide the keyboard and show the <strong>picker_view</strong>.</li>
</ul>
<p>Here is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">my_combo.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'focus'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
drop_button.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_in<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	my_combo.<span style="color: #000066;">blur</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
cancel.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I also added the click event on the <strong>cancel</strong> button to hide the <strong>picker_view</strong>.</p>
<h2>Filling the textField with the picker&#8217;s value</h2>
<p>The only thing we have left is to actually put the value of the picker in the <strong>my_combo</strong> textField when the user clicks the <strong>done</strong> button  and hide the <strong>picker_view</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">done.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	my_combo.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span>  picker.<span style="color: #660066;">getSelectedRow</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">title</span><span style="color: #339933;">;</span>
	picker_view.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>slide_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The <strong>getSelectedRow</strong> method of the picker is returning the selected row, and we use its <strong>title</strong>. The <strong>getSelectedRow</strong> argument is the <strong>index</strong> of the columns in the <strong>picker</strong>, and since we have only one, this is <strong>0</strong>.</p>
<h2>Download the project</h2>
<p>The Resource folder of the project can be downloaded from <a href="http://cssgallery.info/wp-content/combobox_tutorial.zip">here</a>.</p>
<p>Everything is MIT licensed, but as usual, spread the word <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>We have an update</h2>
<p><a href="http://twitter.com/CJ_Reed">@CJ_Reed</a> used this tutorial &#8220;to produce multiple selection type data entry in a single window.&#8221;<br />
Here is how it looks like:<br />
<img src="http://cssgallery.info/wp-content/uploads/2010/05/large_multiCombo.jpg" alt="to produce multiple selection type data entry in a single window." title="multiple selection type data entry in a single window." width="550" height="254" class="alignnone size-full wp-image-1251" /><br />
You can take a look at he&#8217;s code <a href="http://www.pastie.org/983594">here</a>.<br />
Great work!</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
 <a href="http://nosoloweb.es/haciendo-una-lista-de-opciones-desplegables-en-titanium-appcelerator-codigo-y-video-2/" rel="me">Haciendo una lista de opciones desplegables en Titanium Appcelerator – Código y Vídeo</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+&amp;description=A%20true%20iPhone%20or%20Ipad%20combobox%20that%20allows%20you%20to%20use%20%20the%20same%20textfield%20to%20input%20arbitrary%20text%20or%20select%20a%20value%20from%20a%20UIPicker%20element.%20All%20built%20with%20Titanium%20Appcelerator%20to%20include%20in%20your%20iPhone%20application." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;t=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;title=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+&amp;srcUrl=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/&amp;srcTitle=Making+a+combo-box+in+Titanium+Appcelerator+-+code+and+video+&amp;snippet=A%20true%20iPhone%20or%20Ipad%20combobox%20that%20allows%20you%20to%20use%20%20the%20same%20textfield%20to%20input%20arbitrary%20text%20or%20select%20a%20value%20from%20a%20UIPicker%20element.%20All%20built%20with%20Titanium%20Appcelerator%20to%20include%20in%20your%20iPhone%20application." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Create a countdown timer with Titanium Appcelerator</title>
		<link>http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/</link>
		<comments>http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/#comments</comments>
		<pubDate>Thu, 27 May 2010 13:37:18 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[appcelearor]]></category>
		<category><![CDATA[countdoun timer]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[reset timer]]></category>
		<category><![CDATA[set timer]]></category>
		<category><![CDATA[start timer]]></category>
		<category><![CDATA[stop timer]]></category>
		<category><![CDATA[timer]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[titanium tutorial]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=1048</guid>
		<description><![CDATA[How to create a countdown timer for your iPhone with Titanium Appcelerator. Source code available for download. ]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-countdown-timer-with-titanium-appcelerator%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-countdown-timer-with-titanium-appcelerator%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post we will try to show you how to make a countdown timer using Titanium Appcelerator for Iphone or Android applications.  </p>
<p>First we will create an <strong>OOP countDown</strong> object that can be used independently in the background of the application and then we will connect it with some interface elements.</p>
<h3>The countDown object</h3>
<p>To have functional a countdown timer we&#8217;ll need to declare some properties and some methods.</p>
<p>As properties we will set:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">time<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span> m <span style="color: #339933;">:</span> minutes<span style="color: #339933;">,</span> s <span style="color: #339933;">:</span> seconds <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
total_seconds <span style="color: #339933;">:</span> m<span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">+</span>s</pre></div></div>

<p>I think this is pretty clear, <strong>time</strong> is an object with minutes and seconds and <strong>total_seconds</strong> contains the number of seconds until we reach 00:00.</p>
<p>We will need to set methods that will allow us to:</p>
<ul>
<li><strong>set</strong> a time to count from</li>
<li><strong>stop</strong> the timer </li>
<li><strong>start</strong> it.</li>
</ul>
<p>We also ned to set some callback functions that will be executed on each tick of the timer   &#8211; <strong> fn_tick</strong> &#8211;  and one that will execute when the timer reaches 00:00 named <strong>fn_end.</strong></p>
<p>We won&#8217;t make a callback for start because we know when this occurs  we can trigger it by ourselves.</p>
<h2>The countDown timer will look like this:</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> countDown<span style="color: #009900;">&#40;</span> minutes<span style="color: #339933;">,</span> seconds<span style="color: #339933;">,</span> fn_tick<span style="color: #339933;">,</span> fn_complete<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>on this we will be able to apply</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">my_timer.<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span> minutes<span style="color: #339933;">,</span> seconds <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
my_timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
my_tmer.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Below is the code that defines the countDown (pretty simple).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> countDown <span style="color: #339933;">=</span>  <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> m <span style="color: #339933;">,</span> s<span style="color: #339933;">,</span> fn_tick<span style="color: #339933;">,</span> fn_end  <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>
		total_sec<span style="color: #339933;">:</span>m<span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">+</span>s<span style="color: #339933;">,</span>
		timer<span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timer</span><span style="color: #339933;">,</span>
		set<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>m<span style="color: #339933;">,</span>s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">total_sec</span> <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#41;</span><span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">+</span>parseInt<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>m<span style="color: #339933;">:</span>m<span style="color: #339933;">,</span>s<span style="color: #339933;">:</span>s<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		start<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> self <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timer</span> <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>self.<span style="color: #660066;">total_sec</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					self.<span style="color: #660066;">total_sec</span><span style="color: #339933;">--;</span>
					self.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> m <span style="color: #339933;">:</span> parseInt<span style="color: #009900;">&#40;</span>self.<span style="color: #660066;">total_sec</span><span style="color: #339933;">/</span><span style="color: #CC0000;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> s<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span>self.<span style="color: #660066;">total_sec</span><span style="color: #339933;">%</span>60<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
					fn_tick<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
					self.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					fn_end<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #000066;">stop</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			clearInterval<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">timer</span><span style="color: #009900;">&#41;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">time</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>m<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>s<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">total_sec</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And now to use it in our code we will do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> countDown<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">,</span> <span style="color: #CC0000;">5</span> <span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>	<span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">//something here...</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">// something here...</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
my_timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ok, the above example is useless, we will need to display the current time on each tick of the countdown times (so on each second) and at the end we&#8217;ll have to alert the user when we reached 00:00.</p>
<p>We will also need some interface elements to access the countdown methods and to display the current time.</p>
<p>For this we will create a label named <strong>display_lbl</strong>, that will show the time and also 3 buttons : <strong>set_btn</strong> , <strong>start_btn</strong> and <strong>stop_btn</strong>.</p>
<p>Creating the code is pretty simple so I won&#8217;t put the code here but you will be able to take a look at it <a href="http://cssgallery.info/wp-content/countdown_tutorial.zip">downloading the countdown project</a>.</p>
<p>What is most important is to connect the interface with the countdown timer.</p>
<p>So we create the timer  and set the <strong>fn_tick</strong> and <strong>fn_end</strong> functions</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> my_timer <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> countDown<span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><span style="color: #CC0000;">30</span><span style="color: #339933;">,</span> 
		<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			display_lbl.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> my_timer.<span style="color: #660066;">time</span>.<span style="color: #660066;">m</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; : &quot;</span><span style="color: #339933;">+</span>my_timer.<span style="color: #660066;">time</span>.<span style="color: #660066;">s</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;The time is up!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And this is how we connect the buttons with <strong>my_timer</strong></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
set_btn.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	display_lbl.<span style="color: #660066;">text</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;5 : 30&quot;</span><span style="color: #339933;">;</span>
	my_timer.<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><span style="color: #CC0000;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
stop_btn.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	my_timer.<span style="color: #000066;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
start_btn.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	my_timer.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you see we also set the label&#8217;s text to the initial value when we set the timer because otherwise we&#8217;ll loose the first second. We do this here to keep the timer object clean of any external interaction so we can use it even without an interface.</p>
<h2>This is how the final project looks like</h2>
<p><img src="http://cssgallery.info/wp-content/uploads/2010/05/capture-1.png" alt="Countdown timer with Appcelerator" title="Countdown timer with Appcelerator" width="464" height="558" class="alignnone size-full wp-image-1208" /></p>
<p>Please keep in mind that this is just a simple example and we don&#8217;t have a control mechanism to detect when the user stopped the timer or it reached by itself 00:00 &#8211; but you can add it as an exercise <img src='http://cssgallery.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You can download the <strong>Resources</strong> folder of the  project from <a href="http://cssgallery.info/wp-content/countdown_tutorial.zip">here</a>.</p>
<p>Everything is MIT licensed and you can use it in any application you want to, but spreading the word would be nice.</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/crear-un-temporizador-regresivo-con-titanium-appcelerator/" rel="me">Crear un temporizador regresivo con Titanium Appcelerator</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator&amp;description=How%20to%20create%20a%20countdown%20timer%20for%20your%20iPhone%20with%20Titanium%20Appcelerator.%20Source%20code%20available%20for%20download.%20" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;t=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;title=Create+a+countdown+timer+with+Titanium+Appcelerator&amp;srcUrl=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/&amp;srcTitle=Create+a+countdown+timer+with+Titanium+Appcelerator&amp;snippet=How%20to%20create%20a%20countdown%20timer%20for%20your%20iPhone%20with%20Titanium%20Appcelerator.%20Source%20code%20available%20for%20download.%20" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/create-a-countdown-timer-with-titanium-appcelerator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create a nifty tooltip in Titanium</title>
		<link>http://cssgallery.info/create-a-nifty-tooltip-in-titanium/</link>
		<comments>http://cssgallery.info/create-a-nifty-tooltip-in-titanium/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 18:16:59 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[nifty]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[Titanium how-to]]></category>
		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=798</guid>
		<description><![CDATA[How to create a tooltip to those that are using Titanium to develop their iPhone apps. Download the code and test it by yourself.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-nifty-tooltip-in-titanium%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fcreate-a-nifty-tooltip-in-titanium%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post I will show how to create a tooltip to those that are using Titanium to develop their iPhone apps.<br />
Sometimes when we set a button with an icon &#8211;  lets say in navbar &#8211;  a simple icon is not enough to make the user understand what the button is supposed to do.</p>
<h3>For example this one:</h3>
<p><img class="alignnone size-full wp-image-799" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-12.png" alt="" width="320" height="132" /></p>
<p>What would the <strong>rightNavButton</strong> do ? The application is an ebook reader &#8211; if this helps, but I&#8217;m sure it will not&#8230;.</p>
<h3>What about this:</h3>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-22.png"><img class="alignnone size-full wp-image-800" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-22.png" alt="" width="320" height="132" /></a></p>
<p>Now you know that by hitting this button you can continue your reading &#8211;  in case something took you out from the chapter, like  changing a setting, or answering the phone or whatever&#8230;</p>
<p>So let&#8217;s start.</p>
<p>The tooltip is a simple view with the tip image set as background:<br />
<img class="alignnone size-full wp-image-804" title="bubble" src="http://cssgallery.info/wp-content/uploads/2010/04/bubble.png" alt="" width="205" height="57" /></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> lasttipView <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">205</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">57</span><span style="color: #339933;">,</span>
backgroundImage<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;img/bubble.png&quot;</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
right<span style="color: #339933;">:</span><span style="color: #CC0000;">3</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The &#8220;Continue reading&#8221; is a simple label added to this view</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> lasttipLabel <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
text<span style="color: #339933;">:</span><span style="color: #3366CC;">'Continue reading'</span><span style="color: #339933;">,</span>
color<span style="color: #339933;">:</span><span style="color: #3366CC;">'#fff'</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">205</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">34</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>
font<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
fontFamily<span style="color: #339933;">:</span><span style="color: #3366CC;">'Helvetica Neue'</span><span style="color: #339933;">,</span>
fontSize<span style="color: #339933;">:</span><span style="color: #CC0000;">13</span><span style="color: #339933;">,</span>
fontWeight<span style="color: #339933;">:</span><span style="color: #3366CC;">'bold'</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
textAlign<span style="color: #339933;">:</span><span style="color: #3366CC;">'center'</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
lasttipView.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>lasttipLabel<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>and the index window contains the tip view</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">index_win.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>lasttipView<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I supposed we already have the index_win created.</p>
<p>Now when we open the index_win the tooltip will be there and the user will know what the <strong>rightNavButton</strong> does. But if the tooltip stays there it becomes annoying so we need to find a way to hide it. I choose to hide it when the user clicks the button by using a smooth fadeout.</p>
<p>The code below creates an animation and attaches it to the click event.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> anim_out <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAnimation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
anim_out.<span style="color: #660066;">opacity</span><span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
anim_out.<span style="color: #660066;">duration</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
last_read <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createButton</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
image<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;img/tag1.png&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
last_read.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
lasttipView.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span>anim_out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
index_win.<span style="color: #660066;">setRightNavButton</span><span style="color: #009900;">&#40;</span> last_read <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ok, here is the button code too but for simplicity I removed some parts that actually display the chapter and trigger other functions.</p>
<p>That&#8217;s all. Pretty simple, isn&#8217;t it ?</p>
<p><strong> PS.</strong> You can use the bubble image in your apps if you want, only just let me know &#8211; and if you are curious about the app here it is:<br />
<a title="Youth, Isaac Asimov iPhone ebook" href="itms://itunes.apple.com/us/app/youth-isaac-asimov/id367433025?mt=8" target="_blank"><img class="alignnone size-full wp-image-806" title="Youth -  Isaac Asimov iBook" src="http://cssgallery.info/wp-content/uploads/2010/04/iconapp.png" alt="" width="57" height="57" /> Youth, by Isaac Asimov iPhone ebook.</a></p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/crear-un-tooltip-en-titanium/" rel="me">Crear una ingeniosa herramienta de notificación en Titanium</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium&amp;description=How%20to%20create%20a%20tooltip%20to%20those%20that%20are%20using%20Titanium%20to%20develop%20their%20iPhone%20apps.%20Download%20the%20code%20and%20test%20it%20by%20yourself." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;t=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;title=Create+a+nifty+tooltip+in+Titanium&amp;srcUrl=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/&amp;srcTitle=Create+a+nifty+tooltip+in+Titanium&amp;snippet=How%20to%20create%20a%20tooltip%20to%20those%20that%20are%20using%20Titanium%20to%20develop%20their%20iPhone%20apps.%20Download%20the%20code%20and%20test%20it%20by%20yourself." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/create-a-nifty-tooltip-in-titanium/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/create-a-nifty-tooltip-in-titanium/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom row for TableView in Appcelerator Titanium</title>
		<link>http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/</link>
		<comments>http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 12:07:39 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[custom table rows]]></category>
		<category><![CDATA[rows]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=763</guid>
		<description><![CDATA[In this post  I will explain how to create custom rows for TableViews using Titanium Mobile. The project source can be downloaded to play with.]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fcustom-row-for-tableview-in-appcelerator-titanium%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fcustom-row-for-tableview-in-appcelerator-titanium%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post  I will try to explain how to create custom rows for TableViews using Titanium Mobile.</p>
<p>If you don&#8217;t know what <a title="Appcelerator Titanium" href="http://www.appcelerator.com/" target="_blank">Titanium</a> is about,  take a look <a title="Appcelerator Titanium" href="http://www.appcelerator.com/" target="_blank">here</a>. I suppose you already know how to setup and start a Titanium project so I&#8217;ll show only how to create a custom row.</p>
<p>By default a TableView will let you create a row that can have: the left image, the title and the row type decorator set. The next code is an example of the standard data that needs to be passed to a TableView.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> RegData <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
&nbsp;
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'es.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Spain&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'gb.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United Kingdom&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'us.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United States&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> leftImage<span style="color: #339933;">:</span><span style="color: #3366CC;">'fr.png'</span><span style="color: #339933;">,</span> title<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;France&quot;</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> TheTable <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTableView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
data<span style="color: #339933;">:</span>RegData
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>And the result is this:</h3>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-11.png"><img class="alignnone size-full wp-image-790" title="Normal table rows" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-11.png" alt="" width="378" height="186" /></a></p>
<p>Ok, we would like to add more data to a row, maybe something like this:</p>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-21.png"><img class="alignnone size-full wp-image-791" title="Custom row example" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-21.png" alt="" width="378" height="47" /></a></p>
<p>This will require to build the row &#8220;by hand&#8221;. So we need to add a 2 imageViews, the <strong>flag</strong> and the <strong>trend</strong>, and  labelViews for the <strong>country</strong> and the <strong>percent</strong> . We also need to change the data array of course.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> CustomData <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'es.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Spain&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'up.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'28%'</span> <span style="color: #339933;">,</span>hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'gb.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United Kingdom&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'down.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'-3%'</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'us.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;United States&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'up.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'8%'</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#123;</span> flag<span style="color: #339933;">:</span><span style="color: #3366CC;">'fr.png'</span><span style="color: #339933;">,</span> country<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;France&quot;</span><span style="color: #339933;">,</span> trend<span style="color: #339933;">:</span><span style="color: #3366CC;">'down.png'</span><span style="color: #339933;">,</span> percent<span style="color: #339933;">:</span><span style="color: #3366CC;">'-40%'</span><span style="color: #339933;">,</span> hasChild<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We create a <strong>data</strong> variable as an array that will hold the row objects generated.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> data<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>then we walk through the CustomData array, create  a new row , the imageViews and labels and add them to the row.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> CustomData.<span style="color: #660066;">length</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> row <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createTableViewRow</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> flag <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createImageView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
url<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">flag</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">32</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">32</span><span style="color: #339933;">,</span>
left<span style="color: #339933;">:</span><span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> country <span style="color: #339933;">=</span> Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
text<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">country</span><span style="color: #339933;">,</span>
font<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>fontSize<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>fontWeight<span style="color: #339933;">:</span><span style="color: #3366CC;">'bold'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #3366CC;">'auto'</span><span style="color: #339933;">,</span>
textAlign<span style="color: #339933;">:</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span>
top<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>
left<span style="color: #339933;">:</span><span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> percent <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createLabel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
text<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">percent</span><span style="color: #339933;">,</span>
font<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>fontSize<span style="color: #339933;">:</span><span style="color: #CC0000;">12</span><span style="color: #339933;">,</span>fontWeight<span style="color: #339933;">:</span><span style="color: #3366CC;">'bold'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #3366CC;">'auto'</span><span style="color: #339933;">,</span>
textAlign<span style="color: #339933;">:</span><span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span>
bottom<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
left<span style="color: #339933;">:</span><span style="color: #CC0000;">60</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">12</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> trend <span style="color: #339933;">=</span>  Titanium.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createImageView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
url<span style="color: #339933;">:</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">trend</span><span style="color: #339933;">,</span>
width<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>
height<span style="color: #339933;">:</span><span style="color: #CC0000;">16</span><span style="color: #339933;">,</span>
right<span style="color: #339933;">:</span><span style="color: #CC0000;">10</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>flag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>country<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>percent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">add</span><span style="color: #009900;">&#40;</span>trend<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
row.<span style="color: #660066;">hasChild</span><span style="color: #339933;">=</span>CustomData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">hasChild</span><span style="color: #339933;">;</span>
&nbsp;
row.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'coutry_row'</span><span style="color: #339933;">;</span>
&nbsp;
data.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you see we also add a <strong>className</strong> to the row to improve the rendering performance, as the iPhone will reuse the row template with every new data when rendering the table.</p>
<h3>The obtained result is this:</h3>
<p><a href="http://cssgallery.info/wp-content/uploads/2010/04/capture-41.png"><img class="alignnone size-full wp-image-792" title="Custom rows table" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-41.png" alt="" width="379" height="222" /></a></p>
<p>You can download the complete Titanium project from <a title="Custom rows titanium project" href="http://cssgallery.info/wp-content/TableCustomView.zip">here</a>. You will have to create a new project in Titanium and replace the resource folder with the one in the archive.</p>
<p>Let me know your thoughts.</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/filas-personalizadas-para-tableviews-con-titanium/" rel="me">Como crear filas personalizadas para TableViews usando Titanium Móvil</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium&amp;description=In%20this%20post%20%20I%20will%20explain%20how%20to%20create%20custom%20rows%20for%20TableViews%20using%20Titanium%20Mobile.%20The%20project%20source%20can%20be%20downloaded%20to%20play%20with." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;t=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;title=Custom+row+for+TableView+in+Appcelerator+Titanium&amp;srcUrl=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/&amp;srcTitle=Custom+row+for+TableView+in+Appcelerator+Titanium&amp;snippet=In%20this%20post%20%20I%20will%20explain%20how%20to%20create%20custom%20rows%20for%20TableViews%20using%20Titanium%20Mobile.%20The%20project%20source%20can%20be%20downloaded%20to%20play%20with." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/custom-row-for-tableview-in-appcelerator-titanium/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Website of the day: mockapp.com</title>
		<link>http://cssgallery.info/website-of-the-day-mockapp-com/</link>
		<comments>http://cssgallery.info/website-of-the-day-mockapp-com/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 18:41:31 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Website of the day]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[free keynote document]]></category>
		<category><![CDATA[mockapp]]></category>
		<category><![CDATA[simulate]]></category>
		<category><![CDATA[simulator]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=710</guid>
		<description><![CDATA[MockApp.com gives you for free (you need only to register) a keynote document that allows you to mock up iPhone apps, and even simulate the behaviour ( of course without animation ).]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-mockapp-com%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-mockapp-com%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Why?</p>
<p><img class="alignnone size-full wp-image-711" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2009/11/capture-11.png" alt="capture-1" width="450" height="100" /></p>
<p><a href="http://mockapp.com/" target="_blank">MockApp.com</a> gives you for free (you need only to register) a keynote document that allows you to mock up iPhone apps, and even simulate the behaviour (of course without animation).</p>
<p>After this you can export it to pdf, upload it and make a presentation on your iPhone.</p>
<p><img class="alignnone size-full wp-image-712" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2009/11/capture-21.png" alt="capture-2" width="450" height="256" /></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com&amp;description=MockApp.com%20gives%20you%20for%20free%20%28you%20need%20only%20to%20register%29%20a%20keynote%20document%20that%20allows%20you%20to%20mock%20up%20iPhone%20apps%2C%20and%20even%20simulate%20the%20behaviour%20%28%20of%20course%20without%20animation%20%29." rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/website-of-the-day-mockapp-com/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;t=Website+of+the+day%3A+mockapp.com" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;title=Website+of+the+day%3A+mockapp.com&amp;srcUrl=http://cssgallery.info/website-of-the-day-mockapp-com/&amp;srcTitle=Website+of+the+day%3A+mockapp.com&amp;snippet=MockApp.com%20gives%20you%20for%20free%20%28you%20need%20only%20to%20register%29%20a%20keynote%20document%20that%20allows%20you%20to%20mock%20up%20iPhone%20apps%2C%20and%20even%20simulate%20the%20behaviour%20%28%20of%20course%20without%20animation%20%29." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/website-of-the-day-mockapp-com/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/website-of-the-day-mockapp-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website of the day: appcelerator.com</title>
		<link>http://cssgallery.info/website-of-the-day-appcelerator-com/</link>
		<comments>http://cssgallery.info/website-of-the-day-appcelerator-com/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 10:56:41 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Mobile web]]></category>
		<category><![CDATA[Website of the day]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Appcelerator]]></category>
		<category><![CDATA[Titanium Developer]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=685</guid>
		<description><![CDATA[Today&#8217;s website: appcelerator.com Why? Because of the great product they offer for free: Titanium Developer. Titanium is a tool that allows to webdevelopers to build native iPhone and Android apps without  needing to learn cocoa or java. It will compile your project and even help you release it. They have a great section with resources, [...]]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-appcelerator-com%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-appcelerator-com%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Today&#8217;s website: <a href="http://www.appcelerator.com/" target="_blank">appcelerator.com</a></p>
<p><strong>Why?</strong></p>
<p>Because of the great product they offer for free: <strong>Titanium Developer.</strong></p>
<p>Titanium is a tool that allows to webdevelopers to build native iPhone and Android apps without  needing to learn cocoa or java.</p>
<p>It will compile your project and even help you release it.</p>
<p>They have a great section with resources, screencasts, tutorials, code examples and documentations, and a nice community to share and solve your issues.</p>
<p>Take a look.</p>
<p><img class="alignnone size-full wp-image-686" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-19.png" alt="capture-1" width="450" height="243" /></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com&amp;description=Today%27s%20website%3A%20appcelerator.com%0D%0A%0D%0AWhy%3F%0D%0A%0D%0ABecause%20of%20the%20great%20product%20they%20offer%20for%20free%3A%20Titanium%20Developer.%0D%0A%0D%0ATitanium%20is%20a%20tool%20that%20allows%20to%20webdevelopers%20to%20build%20native%20iPhone%20and%20Android%20apps%20without%20%C2%A0needing%20to%20learn%20cocoa%20or%20java.%0D%0A%0D%0AIt%20will%20compile%20your%20project%20and%20even%20help%20you%20re" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/website-of-the-day-appcelerator-com/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;t=Website+of+the+day%3A+appcelerator.com" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;title=Website+of+the+day%3A+appcelerator.com&amp;srcUrl=http://cssgallery.info/website-of-the-day-appcelerator-com/&amp;srcTitle=Website+of+the+day%3A+appcelerator.com&amp;snippet=Today%27s%20website%3A%20appcelerator.com%0D%0A%0D%0AWhy%3F%0D%0A%0D%0ABecause%20of%20the%20great%20product%20they%20offer%20for%20free%3A%20Titanium%20Developer.%0D%0A%0D%0ATitanium%20is%20a%20tool%20that%20allows%20to%20webdevelopers%20to%20build%20native%20iPhone%20and%20Android%20apps%20without%20%C2%A0needing%20to%20learn%20cocoa%20or%20java.%0D%0A%0D%0AIt%20will%20compile%20your%20project%20and%20even%20help%20you%20re" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/website-of-the-day-appcelerator-com/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/website-of-the-day-appcelerator-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone grayscale icons</title>
		<link>http://cssgallery.info/iphone-grayscale-icons/</link>
		<comments>http://cssgallery.info/iphone-grayscale-icons/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 19:08:22 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[app-bits]]></category>
		<category><![CDATA[Eddit]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[glyFX]]></category>
		<category><![CDATA[Glyphish]]></category>
		<category><![CDATA[grayscale]]></category>
		<category><![CDATA[Icondock]]></category>
		<category><![CDATA[Kombine]]></category>
		<category><![CDATA[Pixelpressicons]]></category>
		<category><![CDATA[Simply bold]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=637</guid>
		<description><![CDATA[We&#8217;ll try today to bring some icons to be used for the UI of the iPhone. Like the ones below: The icons should be grayscaled, as the operating system will take care of all the graphic effects &#8211;  like the nice aqua gradient, or the background of the button. Some of the resources presented are [...]]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fiphone-grayscale-icons%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fiphone-grayscale-icons%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We&#8217;ll try today to bring some icons to be used for the UI of the iPhone. Like the ones below:</p>
<p><img class="alignnone size-full wp-image-652" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-25.png" alt="capture-2" width="450" height="117" /></p>
<p>The icons should be grayscaled, as the operating system will take care of all the graphic effects &#8211;  like the nice aqua gradient, or the background of the button.</p>
<p>Some of the resources presented are free and some are paid, but the prices are not high.</p>
<h3>Free:</h3>
<p><a href="http://glyphish.com/" target="_blank">Glyphish</a> &#8211;  130 png icons.</p>
<p><img class="alignnone size-full wp-image-659" title="capture-6" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-62.png" alt="capture-6" width="450" height="117" /></p>
<p><a href="http://www.pixelpressicons.com/?p=108" target="_blank">Pixelpressicons.com</a> &#8211;  a free set for commercial or personal usage.</p>
<p><img class="alignnone size-full wp-image-660" title="capture-7" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-71.png" alt="capture-7" width="450" height="117" /></p>
<p><a href="http://www.glyfx.com/products/free_iphone.html" target="_blank">glyFX.com</a> &#8211;  5 free icons</p>
<p><img class="alignnone size-full wp-image-661" title="capture-8" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-81.png" alt="capture-8" width="450" height="117" /></p>
<p><a href="http://www.app-bits.com/downloads/iphone-toolbar-icon-set.html" target="_blank">app-bits.com</a> &#8211;  48 free icons</p>
<p><img class="alignnone size-full wp-image-663" title="capture-10" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-101.png" alt="capture-10" width="450" height="117" /></p>
<h3>Paid:</h3>
<p><a href="http://eddit.com/shop/iphone_ui_icon_set/" target="_blank">Eddit.com</a></p>
<p>A set of 160 icons.</p>
<p><img class="alignnone size-full wp-image-653" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-18.png" alt="capture-1" width="450" height="117" /></p>
<p>Icondock.com has 2 sets of icons</p>
<p><a href="http://icondock.com/icons/sets/rocky-vector-set" target="_blank">Rocky</a>, a vector set containing 290 icons</p>
<p><img class="alignnone size-full wp-image-654" title="capture-3" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-34.png" alt="capture-3" width="450" height="117" /></p>
<p>and <a href="http://icondock.com/icons/sets/simplybold-vector-set" target="_blank">Simply bold</a>, another vector with over 150 icons.</p>
<p><img class="alignnone size-full wp-image-655" title="capture-4" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-43.png" alt="capture-4" width="450" height="117" /></p>
<p><a href="http://www.pixelpressicons.com/?page_id=118" target="_blank">Pixelpressicons.com</a></p>
<p>A set of 328 icons both available in pixel or vector format.</p>
<p><img class="alignnone size-full wp-image-657" title="capture-5" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-53.png" alt="capture-5" width="450" height="117" /></p>
<p><a href="http://www.kombine.net/icon-store/iphone-tab-bar-icons" target="_blank">Kombine.com</a> &#8211; 130 png icons</p>
<p><img class="alignnone size-full wp-image-662" title="capture-9" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-9.png" alt="capture-9" width="450" height="117" /></p>
<p>Paid or not, this sets of icons can save you time and money in the process of creating an iPhone application. Share yours.</p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons&amp;description=We%27ll%20try%20today%20to%20bring%20some%20icons%20to%20be%20used%20for%20the%20UI%20of%20the%20iPhone.%20Like%20the%20ones%20below%3A%0D%0A%0D%0A%0D%0A%0D%0AThe%20icons%20should%20be%20grayscaled%2C%20as%20the%20operating%20system%20will%20take%20care%20of%20all%20the%20graphic%20effects%20-%20%C2%A0like%20the%20nice%20aqua%20gradient%2C%20or%20the%20background%20of%20the%20button.%0D%0A%0D%0ASome%20of%20the%20resources%20presented%20" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/iphone-grayscale-icons/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/iphone-grayscale-icons/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/iphone-grayscale-icons/&amp;t=iPhone+grayscale+icons" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/iphone-grayscale-icons/&amp;title=iPhone+grayscale+icons&amp;srcUrl=http://cssgallery.info/iphone-grayscale-icons/&amp;srcTitle=iPhone+grayscale+icons&amp;snippet=We%27ll%20try%20today%20to%20bring%20some%20icons%20to%20be%20used%20for%20the%20UI%20of%20the%20iPhone.%20Like%20the%20ones%20below%3A%0D%0A%0D%0A%0D%0A%0D%0AThe%20icons%20should%20be%20grayscaled%2C%20as%20the%20operating%20system%20will%20take%20care%20of%20all%20the%20graphic%20effects%20-%20%C2%A0like%20the%20nice%20aqua%20gradient%2C%20or%20the%20background%20of%20the%20button.%0D%0A%0D%0ASome%20of%20the%20resources%20presented%20" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/iphone-grayscale-icons/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/iphone-grayscale-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mootools with touch events</title>
		<link>http://cssgallery.info/mootools-with-touch-events/</link>
		<comments>http://cssgallery.info/mootools-with-touch-events/#comments</comments>
		<pubDate>Tue, 05 May 2009 11:55:48 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Mobile web]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Element class]]></category>
		<category><![CDATA[mootools iphone events]]></category>
		<category><![CDATA[touch events]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=379</guid>
		<description><![CDATA[I am so used with MooTools as I started to forgot the basic Javascript and more, I started to dislike a lot to write code in pure js. But MooTools lacks the touch events ipod and iphone has. So I wrote a small code that adds the touchevents &#8211;  well, touch, gesture, animation and transform [...]]]></description>
			<content:encoded><![CDATA[<!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fmootools-with-touch-events%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fmootools-with-touch-events%2F&amp;source=dan_tamas&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I am so used with MooTools as I started to forgot the basic Javascript  and more, I started to dislike a lot to write code in pure js. But MooTools lacks the touch events ipod and iphone has. So I wrote a small code that adds the touchevents &#8211;  well, touch, gesture, animation and transform &#8211;  to the Element class.</p>
<p>This will only  help you to add and remove the touch events the MooTools way, you still need to use e.preventDefault() as e.stop() is not working  and to detect touches by yourself. But at least you can use addEvent and removeEvent.</p>
<p>I am sure it can be improved, so If you have any ideas, just let me know.</p>
<p>Oh, yes, the code is here: <a href="http://cssgallery.info/wp-content/mootouch.js" target="_blank">mootouch.js</a></p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/motools-con-eventos-de-toque/" rel="me">Motools con eventos de toque</a></strong></p>
<div style="clear:both;">&nbsp;</div>

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events&amp;description=I%20am%20so%20used%20with%20MooTools%20as%20I%20started%20to%20forgot%20the%20basic%20Javascript%20%20and%20more%2C%20I%20started%20to%20dislike%20a%20lot%20to%20write%20code%20in%20pure%20js.%20But%20MooTools%20lacks%20the%20touch%20events%20ipod%20and%20iphone%20has.%20So%20I%20wrote%20a%20small%20code%20that%20adds%20the%20touchevents%20-%20%C2%A0well%2C%20touch%2C%20gesture%2C%20animation%20and%20transform%20-%20%C2%A0to%20t" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://cssgallery.info/mootools-with-touch-events/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://cssgallery.info/mootools-with-touch-events/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://cssgallery.info/mootools-with-touch-events/&amp;t=Mootools+with+touch+events" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-evernote">
			<a href="http://www.evernote.com/clip.action?url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events" rel="nofollow" class="external" title="Clip this to Evernote">Clip this to Evernote</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://cssgallery.info/mootools-with-touch-events/&amp;title=Mootools+with+touch+events&amp;srcUrl=http://cssgallery.info/mootools-with-touch-events/&amp;srcTitle=Mootools+with+touch+events&amp;snippet=I%20am%20so%20used%20with%20MooTools%20as%20I%20started%20to%20forgot%20the%20basic%20Javascript%20%20and%20more%2C%20I%20started%20to%20dislike%20a%20lot%20to%20write%20code%20in%20pure%20js.%20But%20MooTools%20lacks%20the%20touch%20events%20ipod%20and%20iphone%20has.%20So%20I%20wrote%20a%20small%20code%20that%20adds%20the%20touchevents%20-%20%C2%A0well%2C%20touch%2C%20gesture%2C%20animation%20and%20transform%20-%20%C2%A0to%20t" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-meneame">
			<a href="http://meneame.net/submit.php?url=http://cssgallery.info/mootools-with-touch-events/" rel="nofollow" class="external" title="Submit this to Meneame">Submit this to Meneame</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/mootools-with-touch-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
