<?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>ObjectGraph Blog</title>
	<atom:link href="http://blog.objectgraph.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.objectgraph.com</link>
	<description>News and Info about projects and experiments @ objectgraph.com</description>
	<lastBuildDate>Thu, 02 Feb 2012 01:36:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Geo Measure Now Available In Japanese</title>
		<link>http://blog.objectgraph.com/index.php/2012/02/02/geo-measure-now-available-in-japanese/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/02/02/geo-measure-now-available-in-japanese/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 01:32:47 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[Geo]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[area distance measurement]]></category>
		<category><![CDATA[geomeasure]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2383</guid>
		<description><![CDATA[I am happy to report the availability of a new version of Geo Measure localized for Japanese language. We hope to release other languages based on demand. We also added a new measure for area (Tsubo) Here are some screenshots from Japanese version: Also the iPad version has also been localized for Japan Download the [...]]]></description>
			<content:encoded><![CDATA[<p>I am happy to report the availability of a new version of Geo Measure localized for Japanese language. We hope to release other languages based on demand.</p>
<p>We also added a new measure for area (<a href="http://en.wikipedia.org/wiki/Japanese_units_of_measurement#Area">Tsubo</a>)</p>
<p>Here are some screenshots from Japanese version:</p>
<table>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/ss1.png" alt="" title="ss1" width="180" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/ss2.png" alt="" title="ss1" width="180" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/02/ss3.png" alt="" title="ss1" width="180" />
</td>
</tr>
</table>
<p>Also the iPad version has also been localized for Japan</p>
<p>Download the Version 1.1 from the app store.</p>
<p><a href="http://itunes.apple.com/us/app/geo-measure-map-area-distance/id451326903?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/02/02/geo-measure-now-available-in-japanese/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Development: How to use sqlite in Android</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/28/how-to-use-sqlite-in-android/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/28/how-to-use-sqlite-in-android/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 00:47:43 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[execSQL]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2368</guid>
		<description><![CDATA[One of nice part of Android is sqlite data access is very simple. You don't worry about the path to the sqlite database file and there are a couple of functions to make your file easier.]]></description>
			<content:encoded><![CDATA[<p>One of nice part of Android is sqlite data access is very simple. You don&#8217;t worry about the path to the sqlite database file and there are a couple of functions to make your file easier.</p>
<p><strong>Creating DB</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">SQLiteDatabase db <span style="color: #339933;">=</span> openOrCreateDatabase<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mydb&quot;</span>,MODE_PRIVATE,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>This is a neat function which does open and create at the same time. You need to name your database (e.g. &#8220;mydb&#8221;) and specify the mode to open. In this example, I&#8217;m opening the database as private mode that allows only your app to touch the file.</p>
<p><strong>Execute SQL</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;">db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;CREATE TABLE IF NOT EXISTS mydata (first_name,last_name,age)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO mydata (first_name,last_name,age) VALUES('Jon','Doe',20)&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Since it&#8217;s already opened, executing CRUID operation is available via execSQL function.</p>
<p><strong>Query data</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> db.<span style="color: #006633;">rawQuery</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM mydata ORDER BY age&quot;</span>,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cursor.<span style="color: #006633;">moveToFirst</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #009900;">&#123;</span>
       Log.<span style="color: #006633;">v</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mylog&quot;</span>, cursor.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">+</span> cursor.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">+</span> cursor.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000000; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>cursor.<span style="color: #006633;">moveToNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>To query data, you need two steps:</p>
<p>1. Create a cursor from the result of your select statement<br />
2. Move the cursor and retrieve data via get&#8230; functions. </p>
<p>I often make a mistake to retrieve data from the cursor without calling <strong>moveToFirst() </strong>function. Let&#8217;s call it first and this returns if there is a row to return or not. After moving to the first row, keep calling <strong>moveToNext()</strong> function until you reach the end of rows.</p>
<p><strong>Closing</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;">cursor.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
db.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>Let&#8217;s make sure to close all connection to db. Avoid unnecessary memory usage.</p>
<p>That&#8217;s it. If you want to see a sample project (created by IntelliJ), please click <a href="https://github.com/kiichi/AndroidSQLiteTest/">here</a>. You can browse the entire source code from <a href="https://github.com/kiichi/AndroidSQLiteTest/blob/master/src/com/objectgraph/MyActivity.java">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/28/how-to-use-sqlite-in-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Chinese New Year. iPhone Feng Shui Updated for Year of the Dragon &#8211; 2012!</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/24/happy-chinese-new-year-iphone-feng-shui-updated-for-year-of-the-dragon-2012/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/24/happy-chinese-new-year-iphone-feng-shui-updated-for-year-of-the-dragon-2012/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 08:20:28 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[FengShui]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[chinese astrology]]></category>
		<category><![CDATA[Chinese New Year]]></category>
		<category><![CDATA[feng shui]]></category>
		<category><![CDATA[fengshui]]></category>
		<category><![CDATA[year of the dragon]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2344</guid>
		<description><![CDATA[Happy New Year! Check your forecast with our updated FengShui app 2012 Edition. Year of the Dragon Gong Yi Fa Cai 恭喜發財! In 2012, the Chinese New Year falls on January 23rd in China, which occurs before the official solar start of the year on February 4th, known as Li Chun 立春 or Spring Begins. [...]]]></description>
			<content:encoded><![CDATA[<p>Happy New Year!</p>
<p>Check your forecast with our updated FengShui app 2012 Edition. </p>
<p><a href="http://itunes.apple.com/us/app/feng-shui-chinese-astrology/id418671201?mt=8" target="_blank"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a></p>
<p>Year of the Dragon</p>
<p>Gong Yi Fa Cai 恭喜發財! In 2012, the Chinese New Year falls on January 23rd in<br />
China, which occurs before the official solar start of the year on February 4th, known as Li Chun 立春 or Spring Begins. It is a powerful and dangerous year that starts fluidly; be sure to act smart and move fast. The calendar of this year is very complicated because the first new moon after the Winter Solstice on December 21, 2011 is December 23, 2012, followed by the second new moon and start of the lunar New Year, January 23, 2012 (January 22nd<br />
in Asia). This tight start indicates a “whipping” effect that will bring about strong winds and discontent. Be sure to leave the front door of your home open this evening, especially if it is facing in a beneficial direction, so that you can gather good fortune throughout the night. It is an important year to use Feng Shui, as there will be very dangerous periods during the year for which it will feel as if you are fighting for your life to survive.</p>
<p>Screenshots:</p>
<table>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_1.png" alt="sc1" title="sc1" width="200"  class="alignnone size-full wp-image-1739" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_2.png" alt="sc1" title="sc1" width="200" class="alignnone size-full wp-image-1739" />
</td>
</tr>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_3.png" alt="sc3" title="sc1" width="200"  class="alignnone size-full wp-image-1739" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_4.png" alt="sc4" title="sc1" width="200"  class="alignnone size-full wp-image-1739" />
</td>
</tr>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screenshot_6.png" alt="sc5" title="sc1" width="200" class="alignnone size-full wp-image-1739" />
</td>
<td>
&nbsp;
</td>
</tr>
</table>
<p>You will download now!</p>
<p><a href="http://itunes.apple.com/us/app/feng-shui-chinese-astrology/id418671201?mt=8" target="_blank"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/24/happy-chinese-new-year-iphone-feng-shui-updated-for-year-of-the-dragon-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MoPic is our new app that creates GIF animations</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/12/mopic-is-our-new-app-that-creates-gif-animations/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/12/mopic-is-our-new-app-that-creates-gif-animations/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 03:03:12 +0000</pubDate>
		<dc:creator>serge</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[motion]]></category>
		<category><![CDATA[movie]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2312</guid>
		<description><![CDATA[We just finished our new app for camera enabled iDevices. We called it MoPic. MoPic is a free app that makes it easy to create fun GIFs and share them with your friends. Create a hilarious GIF animation of your cat in the washing machine, a donut disappearing in the mouth of your buddy as [...]]]></description>
			<content:encoded><![CDATA[<p>We just finished our new app for camera enabled iDevices.</p>
<p>We called it MoPic.</p>
<p>MoPic is a free app that makes it easy to create fun GIFs and share them with your friends.</p>
<p>Create a hilarious GIF animation of your cat in the washing machine, a donut disappearing in the mouth of your buddy as it’s being eaten, or anything else that comes to your mind. The possibilities are endless. Animations created with MoPic can easily be shared with your family and friends. Make them laugh endlessly as these GIFs replay these funny moments over and over again.</p>
<p><a href="http://itunes.apple.com/us/app/mopic-video-animation-gif/id492113893?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png"></a>.</p>
<p>How it works:<br />
1. Tap on “Take a Video” or “Choose from Library” buttons to select your video or single frames.<br />
2. Tap on “Done” to generate a preview of the GIF and adjust the speed<br />
3. Share it with your friends over Email, Twitter or Save it for later. (More options in upcoming updates)</p>
<p>Features:<br />
✓ Generate random GIFs based on the video you provide<br />
✓ Select frames you would like to use in your GIF animation<br />
✓ Share it with your friends.<br />
✓ Works only with 30 FPS at the moment.</p>
<table>
<tr>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss1-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss2-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
</tr>
<tr>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss3-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss4-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
</tr>
<tr>
<td><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss5-292x550.png" alt="" title="ss1" width="250" class="alignleft size-large wp-image-2326" /></td>
<td></td>
</tr>
</table>
<p>Compatible Hardware: iPhone 3GS, iPhone 4, 4th gen iPod Touch, iPad 2 (in 2x mode only)<br />
Compatible OS: iOS 4.1 and greater.</p>
<p>Please write us and feel free to give us your feedback or request new features that you would like to see in future updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/12/mopic-is-our-new-app-that-creates-gif-animations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to create a compass in iPhone</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/10/how-to-create-a-compass-in-iphone/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/10/how-to-create-a-compass-in-iphone/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 19:01:38 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[FengShui]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[CABasicAnimation]]></category>
		<category><![CDATA[CLLocationManager]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[core animation]]></category>
		<category><![CDATA[didUpdateHeading]]></category>
		<category><![CDATA[direction]]></category>
		<category><![CDATA[location manager]]></category>
		<category><![CDATA[startUpdatingHeading]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2194</guid>
		<description><![CDATA[A Happy New Year! I hope everyone enjoy this winter season. I want you to remember another new year holiday, which is in Chinese calendar, coming in a few weeks. We will update our Chinese Astrology and Feng Shui App with a bunch of features, such as a compass to show direction on the screen. [...]]]></description>
			<content:encoded><![CDATA[<p>A Happy New Year! I hope everyone enjoy this winter season. I want you to remember another new year holiday, which is in Chinese calendar, coming in a few weeks. We will update our <a href="http://blog.objectgraph.com/index.php/2011/02/15/chinese-astrology-and-feng-shui-app-for-iphone/">Chinese Astrology and Feng Shui App</a> with a bunch of features, such as a compass to show direction on the screen. According to our partner, Eco-Med LLC which is Feng Shui guru company, ancient Chinese people have developed complex schema to determine the layout of rooms / furnitures depend on your &#8220;lucky&#8221; direction. In 21st century, the iPhone in your pocket contains a small device, it&#8217;s called magnetrometer, helps you to solve the difficult puzzle in a quick and easy way. In this article, I would like to explain the simplest method to implement a compass in your app. This tutorial contains following items:</p>
<ul>
<li>Know how to use Location Manager</li>
<li>Convert degree to radian</li>
<li>Understanding Core Animation to rotate an image</li>
</ul>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-02-at-3.07.19-PM-150x150.png" alt="" title="Screen-Shot-2012-01-02-at-3.07.19-PM" width="150" height="150" class="alignnone size-thumbnail wp-image-2209" /></p>
<p><strong>Step 1:</strong> Create a project (e.g. CompassExample) and include frameworks</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &lt;CoreLocation/CoreLocation.h&gt;</span>
<span style="color: #6e371a;">#import &lt;QuartzCore/QuartzCore.h&gt;</span></pre>
</div>
</div>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-02-at-2.04.58-PM.png" alt="" title="Screen Shot 2012-01-02 at 2.04.58 PM" width="247" height="186" class="alignnone size-full wp-image-2210" /></p>
<p><strong>Step 2:</strong> In .h file, create Location Manager Object</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">CLLocationManager <span style="color: #002200;">*</span>locationManager;</pre>
</div>
</div>
<p>Implement delegate</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">&lt;CLLocationManagerDelegate&gt;</pre>
</div>
</div>
<p>Next, add parameter</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic,retain<span style="color: #002200;">&#41;</span> CLLocationManager <span style="color: #002200;">*</span>locationManager;</pre>
</div>
</div>
<p>&#8230; don&#8217;t forget to synthesize it in .m file.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@synthesize</span> locationManager;</pre>
</div>
</div>
<p><strong>Step 3:</strong> In .h file, create UIImageView and add reference in Interface Builder </p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-02-at-2.13.22-PM-300x248.png" alt="" title="Screen Shot 2012-01-02 at 2.13.22 PM" width="300" height="248" class="alignnone size-medium wp-image-2211" /></p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">IBOutlet UIImageView <span style="color: #002200;">*</span>compassImage;</pre>
</div>
</div>
<p><a href="https://github.com/kiichi/CompassExample/blob/master/CompassExample/compass_needle.png">Download Image from here</a></p>
<p><strong>Step 4:</strong> In .m file&#8217;s viewDidLoad function, initialize the location manager.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">	locationManager<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CLLocationManager alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	locationManager.desiredAccuracy <span style="color: #002200;">=</span> kCLLocationAccuracyBest;
	locationManager.headingFilter <span style="color: #002200;">=</span> <span style="color: #2400d9;">1</span>;
	locationManager.delegate<span style="color: #002200;">=</span>self;
	<span style="color: #002200;">&#91;</span>locationManager startUpdatingHeading<span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p><strong>Step 5:</strong> In .m file, implement delegate function.</p>
<p>First, you need to convert degree (e.g 360) to radian (e.g 3.14=2PI).<br />
Second, multiply -1 in order to rotate opposite direction that you twist your phone.<br />
Third, apply rotation with core animation function. In this example, I&#8217;m rotating from the current value to the new value. The duration is 0.5 second as you see below.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>locationManager<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CLLocationManager <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>manager didUpdateHeading<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>CLHeading <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>newHeading<span style="color: #002200;">&#123;</span>
	<span style="color: #11740a; font-style: italic;">// Convert Degree to Radian and move the needle</span>
	<span style="color: #a61390;">float</span> oldRad <span style="color: #002200;">=</span>  <span style="color: #002200;">-</span>manager.heading.trueHeading <span style="color: #002200;">*</span> M_PI <span style="color: #002200;">/</span> 180.0f;
	<span style="color: #a61390;">float</span> newRad <span style="color: #002200;">=</span>  <span style="color: #002200;">-</span>newHeading.trueHeading <span style="color: #002200;">*</span> M_PI <span style="color: #002200;">/</span> 180.0f;
	CABasicAnimation <span style="color: #002200;">*</span>theAnimation;
	theAnimation<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span>CABasicAnimation animationWithKeyPath<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;transform.rotation&quot;</span><span style="color: #002200;">&#93;</span>;
	theAnimation.fromValue <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithFloat<span style="color: #002200;">:</span>oldRad<span style="color: #002200;">&#93;</span>;
	theAnimation.toValue<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithFloat<span style="color: #002200;">:</span>newRad<span style="color: #002200;">&#93;</span>;
	theAnimation.duration <span style="color: #002200;">=</span> 0.5f;
	<span style="color: #002200;">&#91;</span>compassImage.layer addAnimation<span style="color: #002200;">:</span>theAnimation forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;animateMyRotation&quot;</span><span style="color: #002200;">&#93;</span>;
	compassImage.transform <span style="color: #002200;">=</span> CGAffineTransformMakeRotation<span style="color: #002200;">&#40;</span>newRad<span style="color: #002200;">&#41;</span>;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%f (%f) =&gt; %f (%f)&quot;</span>, manager.heading.trueHeading, oldRad, newHeading.trueHeading, newRad<span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<p>That&#8217;s it! Of course, you have to deploy the app on your device to check the direction.</p>
<p><strong>Source Code:</strong></p>
<p><a href="https://github.com/kiichi/CompassExample">https://github.com/kiichi/CompassExample</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/10/how-to-create-a-compass-in-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Development: Passing Data Between Activities</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/03/android-development-passing-data-between-activities/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/03/android-development-passing-data-between-activities/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 20:57:46 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[activity]]></category>
		<category><![CDATA[android development]]></category>
		<category><![CDATA[data passing]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2238</guid>
		<description><![CDATA[This article shows how to pass data between activities in Android. The main classes you would use are <code>Intent</code> and <code>Bundle</code>]]></description>
			<content:encoded><![CDATA[<p>Every thing you do in android is an instance of Activity class. The back button (mostly implemented in hardware &#8211; now also on software &#8211; Example Galaxy Tab 10.1 and ICS) allows to unload current activity and go back to previous one.</p>
<p>Lets say you are building a game and would like to pass data between your menu screen and the game screen. You show a bunch of options to the user in the menu screen and you have to pass the appropriate paramater to the Game Screen. Lets call our Activities <code>GameActivity</code> and <code>MenuActivity</code></p>
<p>Loading a different GameActivity from MenuActivity:</p>
<p>First thing you need to understand is how to load a different activity from current activity. In order to do this, we use Intent class. Here is some code.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">Intent intent<span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>view.<span style="color: #006633;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,GameActivity.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>intent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>As you can see Intent class will load the class dynamically (reflection) and show you the new activity on the screen. Lets assume you created 3 buttons on the menu screen</p>
<p>1. Easy<br />
2. Medium<br />
3. Hard</p>
<p>You have to pass a parameter to your GameActivity which level the user wants to play. Here is some code that will accomplish it.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;">Intent intent<span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>view.<span style="color: #006633;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>,GameActivity.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Bundle bundle<span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Bundle<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
bundle.<span style="color: #006633;">putString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;gameLevel&quot;</span>,<span style="color: #0000ff;">&quot;Easy&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">putExtras</span><span style="color: #009900;">&#40;</span>bundle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>intent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>You would repeat the same code above for different Game Level selections on your MenuActivity.</p>
<p>In the Game Activity you need to retrieve the passed bundle.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">Bundle bundle<span style="color: #339933;">=</span>getIntent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getExtras</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">String</span> level<span style="color: #339933;">=</span>bundle.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;gameLevel&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>level.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Easy&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
...
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>level.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Medium&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span>
...
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/datapassing.png" alt="" title="datapassing" width="600" height="500" class="alignnone size-full wp-image-2251" /></p>
<p>You can pass various other types in a bundle.  Check Android documentation at <a href="http://developer.android.com/reference/android/os/Bundle.html">http://developer.android.com/reference/android/os/Bundle.html</a></p>
<p>Download Source for the sample project Below</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2012/01/DataPassingBetweenActivities.zip"><img src="http://blog.objectgraph.com/wp-includes/images/crystal/archive.png">Sample Project</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/03/android-development-passing-data-between-activities/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android Development: Using SoundPool instead of MediaPlayer</title>
		<link>http://blog.objectgraph.com/index.php/2012/01/02/android-development-using-soundpool-instead-of-mediaplayer/</link>
		<comments>http://blog.objectgraph.com/index.php/2012/01/02/android-development-using-soundpool-instead-of-mediaplayer/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 20:41:57 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[MediaPlayer]]></category>
		<category><![CDATA[SoundPool]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2079</guid>
		<description><![CDATA[We show how you can use SoundPlayer and MediaPlayer when you need to play sounds in Android.]]></description>
			<content:encoded><![CDATA[<p>I wanted to launch a simple app for Kindle Fire to test the Amazon market place for Android Apps. You can download the app <a href="http://www.amazon.com/ObjectGraph-LLC-Christmas-Sounds/dp/B006LLZ1Z6/ref=sr_1_cc_1?s=electronics&#038;ie=UTF8&#038;qid=1325539455&#038;sr=1-1-catcorr">here</a>.</p>
<p> I chose one of our simplest sounds apps for Christmas. Here is a screenshot of the same.</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2012/01/ss1_fire.png" alt="" title="ss1_fire" width="600" height="1024" class="alignnone size-full wp-image-2207" /></p>
<p>The top buttons play the background music and the individual icons on the shelf play simple sounds.</p>
<p>My first struggle was with the layout and making it work with various other android devices. I will write an another post for that. But with regards to playing the actual sound files there were problems also.</p>
<p>There are 2 ways of playing sounds.</p>
<p>1. MediaPlayer class<br />
2. SoundPool class</p>
<p>MediaPlayer:</p>
<p>Using media player is simple.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">MediaPlayer backgroundMusicPlayer1<span style="color: #339933;">;</span>
backgroundMusicPlayer1 <span style="color: #339933;">=</span> MediaPlayer.<span style="color: #006633;">create</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, R.<span style="color: #006633;">raw</span>.<span style="color: #006633;">music1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
backgroundMusicPlayer1.<span style="color: #006633;">setLooping</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>And in order to play the music, just call</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">backgroundMusicPlayer1.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>This is fine for playing a few files, but as you keep calling <code>MediaPlayer.create(..)</code>, You will run out of memory and your app will crash. The better way to do this is using SoundPool class.</p>
<p>Instantiate SoundPool class</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #666666; font-style: italic;">//Declaration</span>
SoundPool soundPool<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Initialization </span>
soundPool <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoundPool<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8</span>, AudioManager.<span style="color: #006633;">STREAM_MUSIC</span>, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>The first parameter is number of simultaneous streams you can have. second is type of stream and third is quality. 3rd parameter has not been implemented as of this writing, so you can safely just put a zero.</p>
<p>Here is documentation for SoundPool: <a href="http://developer.android.com/reference/android/media/SoundPool.html" title="http://developer.android.com/reference/android/media/SoundPool.html">http://developer.android.com/reference/android/media/SoundPool.html</a></p>
<p>Unfortunately whenever a sound is loaded to the soundPool, it generates its own SoundID (An integer) that you have to keep track of. In my app, I just created a hashmap that takes cares of mapping the loaded soundIDs to Icon tags.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Declaration</span>
HashMap<span style="color: #339933;">&lt;</span>String, Integer<span style="color: #339933;">&gt;</span> soundPlayers<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Initialization</span>
soundPlayers <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HashMap<span style="color: #339933;">&lt;</span>String, Integer<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>I load sounds dynamically when an icon is clicked. Here is my code.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre>
</td>
<td class="code">
<pre class="java" style="font-family:monospace;">btn.<span style="color: #006633;">setOnClickListener</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> OnClickListener<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onClick<span style="color: #009900;">&#40;</span><span style="color: #003399;">View</span> v<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     v.<span style="color: #006633;">startAnimation</span><span style="color: #009900;">&#40;</span>AnimationUtils.<span style="color: #006633;">loadAnimation</span><span style="color: #009900;">&#40;</span>ChristmasSoundsActivity.<span style="color: #000000; font-weight: bold;">this</span>, R.<span style="color: #006633;">anim</span>.<span style="color: #006633;">image_click</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>soundPlayers.<span style="color: #006633;">containsKey</span><span style="color: #009900;">&#40;</span>v.<span style="color: #006633;">getTag</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #000066; font-weight: bold;">int</span> sound <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#41;</span> soundPlayers.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>v.<span style="color: #006633;">getTag</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         soundPool.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span>sound, 1.0f, 1.0f, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0</span>, 1.0f<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #009900;">&#125;</span>
     <span style="color: #000000; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
         <span style="color: #000066; font-weight: bold;">int</span> sound <span style="color: #339933;">=</span> soundPool.<span style="color: #006633;">load</span><span style="color: #009900;">&#40;</span>ChristmasSoundsActivity.<span style="color: #000000; font-weight: bold;">this</span>, getResources<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getIdentifier</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sound&quot;</span> <span style="color: #339933;">+</span> v.<span style="color: #006633;">getTag</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;raw&quot;</span>, <span style="color: #0000ff;">&quot;com.objectgraph.ChristmasSounds&quot;</span><span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         soundPlayers.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span>v.<span style="color: #006633;">getTag</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, sound<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #009900;">&#125;</span>
&nbsp;
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>In Line6 as you can see, I am calling the soundPool.play</p>
<p>The first parameter is the soundID which i get from my hashmap. The parameters are listed below.</p>
<div class="wp_syntax">
<div class="code">
<pre class="java" style="font-family:monospace;">paramter <span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span>soundID	a soundID returned by the load<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> function
paramter <span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span>leftVolume	left volume value <span style="color: #009900;">&#40;</span>range <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.0</span> to <span style="color: #cc66cc;">1.0</span><span style="color: #009900;">&#41;</span>
paramter <span style="color: #cc66cc;">3</span><span style="color: #339933;">:</span>rightVolume	right volume value <span style="color: #009900;">&#40;</span>range <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.0</span> to <span style="color: #cc66cc;">1.0</span><span style="color: #009900;">&#41;</span>
paramter <span style="color: #cc66cc;">4</span><span style="color: #339933;">:</span>priority	stream priority <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span> <span style="color: #339933;">=</span> lowest priority<span style="color: #009900;">&#41;</span>
paramter <span style="color: #cc66cc;">5</span><span style="color: #339933;">:</span>loop	loop mode <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span> <span style="color: #339933;">=</span> no loop, <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">=</span> loop forever<span style="color: #009900;">&#41;</span>
paramter <span style="color: #cc66cc;">6</span><span style="color: #339933;">:</span>rate	playback rate <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1.0</span> <span style="color: #339933;">=</span> normal playback, range <span style="color: #cc66cc;">0.5</span> to <span style="color: #cc66cc;">2.0</span><span style="color: #009900;">&#41;</span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2012/01/02/android-development-using-soundpool-instead-of-mediaplayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Core Image Framework in IOS 5.0</title>
		<link>http://blog.objectgraph.com/index.php/2011/12/31/core-image-framework-in-ios-5-0/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/12/31/core-image-framework-in-ios-5-0/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 07:36:58 +0000</pubDate>
		<dc:creator>soe</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[coreimage]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2149</guid>
		<description><![CDATA[With the new ios 5 comes new frameworks. Today we are going to investigate one of the new framework: Core Image Framework. Core Image framework contains built in image filters to manipulate images and videos. The framework includes basic image filters like Sepia tone and Monochrome to advance image operations like face detection. One of [...]]]></description>
			<content:encoded><![CDATA[<p>With the new ios 5 comes new frameworks. Today we are going to investigate one of the new framework: Core Image Framework. Core Image framework contains built in image filters to manipulate images and videos. The framework includes basic image filters like <span>Sepia tone and Monochrome to advance image operations like face detection. One of the main advantage of the Core Image Framework is it&#8217;s ability to be able to use both CPU and GPU power, and the result is very fast image processing. The framework can even support the real time processing of video frames.</span><br />
There are 3 main components in Core Image Framework:</p>
<ul>
<li>CIImage: holds the image data</li>
<li>CIFilter: holds filters information and attributes</li>
<li>CIContext: is where all the image processing are taking place</li>
</ul>
<p>For this article we will try out &#8220;CISepiaTone&#8221; filter. Let&#8217;s start</p>
<p>1. Open your Xcode and create a single view application<br />
2. Add CoreImage.framework framework to the project<br />
3. Add an image (any image in jpg or png) to our project<br />
4. Let&#8217;s add an UIImageView to our xib and add the UIImageView in our .h file and connect with our UIImageView in the xib</p>
<ol></ol>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">UIImageView <span style="color: #002200;">*</span>imageView;</pre>
</div>
</div>
<p>5. In the viewDidLoad method, add the following code</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">  <span style="color: #11740a; font-style: italic;">//First load our image</span>
   <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>filePath <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSBundle</span> mainBundle<span style="color: #002200;">&#93;</span> pathForResource<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;image_name&quot;</span> ofType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;jpg&quot;</span><span style="color: #002200;">&#93;</span>;
   <span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>fileNameAndPath <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> fileURLWithPath<span style="color: #002200;">:</span>filePath<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">//We need context, filter, sourceimage and outputimage</span>
    CIContext <span style="color: #002200;">*</span>context;
    CIFilter <span style="color: #002200;">*</span>filter;
    CIImage <span style="color: #002200;">*</span>sourceImage;
    CIImage <span style="color: #002200;">*</span>outputImage;
&nbsp;
    <span style="color: #11740a; font-style: italic;">//Get the source image from NSURL </span>
    sourceImage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CIImage imageWithContentsOfURL<span style="color: #002200;">:</span>fileNameAndPath<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">//Create context, here you can also specify cpu or gpu option</span>
    context <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CIContext contextWithOptions<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">//Declare our filter and attribute value</span>
    filter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CIFilter filterWithName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CISepiaTone&quot;</span>
                        keysAndValues<span style="color: #002200;">:</span> kCIInputImageKey, sourceImage,
                        <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;inputIntensity&quot;</span>, <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSNumber</span> numberWithFloat<span style="color: #002200;">:</span><span style="color: #2400d9;">0.8</span><span style="color: #002200;">&#93;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">//Apply filter and write to output image</span>
    outputImage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>filter outputImage<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">//Assign outputimage to cgimage, cgimage to UIImage and then to our UIImageView</span>
    CGImageRef cgimg <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>context createCGImage<span style="color: #002200;">:</span>outputImage fromRect<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>outputImage extent<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
    UIImage <span style="color: #002200;">*</span>newImg <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIImage imageWithCGImage<span style="color: #002200;">:</span>cgimg<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #002200;">&#91;</span>imageView setImage<span style="color: #002200;">:</span>newImg<span style="color: #002200;">&#93;</span>;
&nbsp;
    CGImageRelease<span style="color: #002200;">&#40;</span>cgimg<span style="color: #002200;">&#41;</span>;</pre>
</div>
</div>
<p>Run the project and you will see your image is transformed by the filter. You can read more about the framework and additional filters on developer.apple.com<br />
Here are the screen shots of before and after effects of our filter:<br />
<a href="http://blog.objectgraph.com/wp-content/uploads/2011/12/ScreenShotBefore.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/12/ScreenShotBefore.png" alt="ScreenShotBefore" title="ScreenShotBefore" width="396" height="744" class="alignnone size-full wp-image-2188" /></a><a href="http://blog.objectgraph.com/wp-content/uploads/2011/12/ScreenShotAfter.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/12/ScreenShotAfter.png" alt="ScreenShotAfter" title="ScreenShotAfter" width="396" height="744" class="alignnone size-full wp-image-2189" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/12/31/core-image-framework-in-ios-5-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My adventures with the Sparrow framework</title>
		<link>http://blog.objectgraph.com/index.php/2011/12/31/my-adventures-with-the-sparrow-framework/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/12/31/my-adventures-with-the-sparrow-framework/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 06:01:40 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[sparrow]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2153</guid>
		<description><![CDATA[I had been looking into 2D game development frameworks when one of my friends suggested the Sparrow framework. Having struggled with OpenGLES in the past, I was eager to find a higher-level framework that would allow me to produce some working concepts without writing mountains of code just to render a basic shape on the [...]]]></description>
			<content:encoded><![CDATA[<p>I had been looking into 2D game development frameworks when one of my friends suggested the Sparrow framework. Having struggled with OpenGLES in the past, I was eager to find a higher-level framework that would allow me to produce some working concepts without writing mountains of code just to render a basic shape on the screen.</p>
<p>I found Sparrow extremely easy to learn and if you have prior 2D or 3D game development experience, it should be even easier to pick up. To get started, download the latest package from:</p>
<p>http://www.sparrow-framework.org/download/</p>
<p>This package comes with the Sparrow library, a demo project, and a scaffold project that can be used as a starting point for all of your Sparrow apps.</p>
<p>For more detail, you can always read the Getting Started guide at:</p>
<p>http://www.sparrow-framework.org/help/gettingstarted/</p>
<p>When you first try to compile, you may get some errors related to the Sparrow source path. To remedy this, go to Xcode preferences > Locations > Source Trees. Create a variable called SPARROW_SRC and point it to the absolute path of your /sparrow/src/ folder.</p>
<p>For example, mine is:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>ken<span style="color: #000000; font-weight: bold;">/</span>Work<span style="color: #000000; font-weight: bold;">/</span>Sparrow-Framework<span style="color: #000000; font-weight: bold;">/</span>sparrow<span style="color: #000000; font-weight: bold;">/</span>src</pre>
</div>
</div>
<p>Try testing out the scaffold project to see if it works. If you&#8217;re able to see a red square rendered on the screen, Sparrow is setup correctly. Pretty boring so far, right?</p>
<p>I wanted to take it a step further and had an idea in my mind. My first inspiration came from typing in &#8220;let it snow&#8221; in Google. Determined to produce something with a somewhat similar effect on the iPhone, I had to see what Sparrow was capable of. The concept was to show a glass window on a snowy night. As time passes, snow will accumulate on the window. You may then use your finger to swipe away the snow.</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/12/google_let_it_snow-550x300.png" alt="google_let_it_snow" title="google_let_it_snow" width="550" height="300" class="alignnone size-large wp-image-2161" /></p>
<p>First I created a canvas of type SPRenderTexture to draw on.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">SPRenderTexture <span style="color: #002200;">*</span>mTexCanvas;
SPImage <span style="color: #002200;">*</span>mImgCanvas;</pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">mTexCanvas <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>SPRenderTexture alloc<span style="color: #002200;">&#93;</span> initWithWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">320</span> height<span style="color: #002200;">:</span><span style="color: #2400d9;">480</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>mTexCanvas clearWithColor<span style="color: #002200;">:</span>0xffffff alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span>;
mImgCanvas <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SPImage imageWithTexture<span style="color: #002200;">:</span>mTexCanvas<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>self addChild<span style="color: #002200;">:</span>mImgCanvas<span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>Next, I needed snowflakes of type SPImage for a few different sizes.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">SPImage <span style="color: #002200;">*</span>mImgSnowLarge;
SPImage <span style="color: #002200;">*</span>mImgSnowMed;
SPImage <span style="color: #002200;">*</span>mImgSnowSmall;</pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">mImgSnowLarge <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SPImage imageWithContentsOfFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;snow_l.png&quot;</span><span style="color: #002200;">&#93;</span>;
mImgSnowMed <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SPImage imageWithContentsOfFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;snow_m.png&quot;</span><span style="color: #002200;">&#93;</span>;
mImgSnowSmall <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SPImage imageWithContentsOfFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;snow_s.png&quot;</span><span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>We will also need to create an eraser brush to wipe away the snow.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">SPImage <span style="color: #002200;">*</span>brush;</pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">brush <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SPImage imageWithContentsOfFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;erase.png&quot;</span><span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>I also created an SPImage for the background of the sky.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">SPImage <span style="color: #002200;">*</span>mImgSky;</pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">mImgSky <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SPImage imageWithContentsOfFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;night.png&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>mImgSky retain<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>self addChild<span style="color: #002200;">:</span>mImgSky<span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>Since I wanted the snow to accumulate on the window glass over time, I also added a timer.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSTimer</span> <span style="color: #002200;">*</span>mTimer;</pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">mTimer <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSTimer</span> scheduledTimerWithTimeInterval<span style="color: #002200;">:</span>0.1f target<span style="color: #002200;">:</span>self selector<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>ticked<span style="color: #002200;">&#41;</span> userInfo<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> repeats<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>To keep track of the touch events when you drag the eraser brush over the snow, I added event listeners to check when erasing firt took place and when erasing finished.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>self addEventListener<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>update<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> atObject<span style="color: #002200;">:</span>self forType<span style="color: #002200;">:</span>SP_EVENT_TYPE_ENTER_FRAME<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>self addEventListener<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>touched<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> atObject<span style="color: #002200;">:</span>self forType<span style="color: #002200;">:</span>SP_EVENT_TYPE_TOUCH<span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>One thing that I had noticed was that Sparrow did not support erasing out of the box. After digging through some of the Sparrow extensions, I stumbled upon SPRenderTexture+Erase that might be able to do what I wanted.</p>
<p>After some experimentation, it did exactly what I needed it to do. This extension allowed me to erase a SPRenderTexture with an SPDisplayObject. In my case, my eraser brush was an SPImage. Erasing is simply one line of code whenever erasing took place.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span>mTexCanvas eraseWithObject<span style="color: #002200;">:</span>brush<span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
<p>My update and touched event handlers look like this.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>update<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>SPEnterFrameEvent<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>event<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>drawing<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
		<span style="color: #11740a; font-style: italic;">// group the draw calls together for speed</span>
		<span style="color: #002200;">&#91;</span>mTexCanvas bundleDrawCalls<span style="color: #002200;">:^</span><span style="color: #002200;">&#123;</span>
			<span style="color: #a61390;">double</span> incX <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>newTouch.x <span style="color: #002200;">-</span> lastTouch.x<span style="color: #002200;">&#41;</span><span style="color: #002200;">/</span>numSteps;
			<span style="color: #a61390;">double</span> incY <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>newTouch.y <span style="color: #002200;">-</span> lastTouch.y<span style="color: #002200;">&#41;</span><span style="color: #002200;">/</span>numSteps;
			brush.x <span style="color: #002200;">=</span> lastTouch.x <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>brush.width<span style="color: #002200;">/</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span>;
			brush.y <span style="color: #002200;">=</span> lastTouch.y <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>brush.height<span style="color: #002200;">/</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span>;
&nbsp;
			<span style="color: #11740a; font-style: italic;">// loop through so that if our touches are far apart we still create a line</span>
			<span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span> i<span style="color: #002200;">=</span><span style="color: #2400d9;">0</span>; i&lt;numSteps; i<span style="color: #002200;">++</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
				<span style="color: #002200;">&#91;</span>mTexCanvas eraseWithObject<span style="color: #002200;">:</span>brush<span style="color: #002200;">&#93;</span>;
				brush.x <span style="color: #002200;">+=</span> incX;
				brush.y <span style="color: #002200;">+=</span> incY;
			<span style="color: #002200;">&#125;</span>
		<span style="color: #002200;">&#125;</span><span style="color: #002200;">&#93;</span>;
		lastTouch <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span>newTouch.x, newTouch.y<span style="color: #002200;">&#41;</span>;
	<span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>touched<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>SPTouchEvent<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>event<span style="color: #002200;">&#123;</span>
	SPTouch <span style="color: #002200;">*</span>touchStart <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>event touchesWithTarget<span style="color: #002200;">:</span>self andPhase<span style="color: #002200;">:</span>SPTouchPhaseBegan<span style="color: #002200;">&#93;</span> anyObject<span style="color: #002200;">&#93;</span>;
	SPPoint <span style="color: #002200;">*</span>touchPosition;
	<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>touchStart<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
		touchPosition <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touchStart locationInSpace<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
		lastTouch <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span>touchPosition.x, touchPosition.y<span style="color: #002200;">&#41;</span>;
		newTouch <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span>touchPosition.x, touchPosition.y<span style="color: #002200;">&#41;</span>;
	<span style="color: #002200;">&#125;</span>
&nbsp;
	SPTouch <span style="color: #002200;">*</span>touchMove <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>event touchesWithTarget<span style="color: #002200;">:</span>self andPhase<span style="color: #002200;">:</span>SPTouchPhaseMoved<span style="color: #002200;">&#93;</span> anyObject<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>touchMove<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
		touchPosition <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touchMove locationInSpace<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
		newTouch <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span>touchPosition.x, touchPosition.y<span style="color: #002200;">&#41;</span>;
		drawing <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>;
	<span style="color: #002200;">&#125;</span>
&nbsp;
	SPTouch <span style="color: #002200;">*</span>touchEnd <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>event touchesWithTarget<span style="color: #002200;">:</span>self andPhase<span style="color: #002200;">:</span>SPTouchPhaseEnded<span style="color: #002200;">&#93;</span> anyObject<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span>touchEnd<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#123;</span>
		touchPosition <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touchEnd locationInSpace<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
		lastTouch <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span>touchPosition.x, touchPosition.y<span style="color: #002200;">&#41;</span>;
		newTouch <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span>touchPosition.x, touchPosition.y<span style="color: #002200;">&#41;</span>;
		drawing <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
	<span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<p>That&#8217;s all there is to it. Once I build and run, I get something like this.</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/12/sparrow_ss01-292x550.png" alt="sparrow_ss01" title="sparrow_ss01" width="292" height="550" class="alignnone size-large wp-image-2159" /></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/12/sparrow_ss02-292x550.png" alt="sparrow_ss02" title="sparrow_ss02" width="292" height="550" class="alignnone size-large wp-image-2160" /></p>
<p>I&#8217;ve also posted a short 30 seconds video below.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/qqU6ITFbYA8" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/12/31/my-adventures-with-the-sparrow-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IntelliJ brings back my interest in Android</title>
		<link>http://blog.objectgraph.com/index.php/2011/12/30/intellij-android-like/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/12/30/intellij-android-like/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 22:12:31 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[andorid]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ide]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2126</guid>
		<description><![CDATA[IntelliJ is awesome for developing Android apps.  In this blog post, I show how to setup your IntelliJ community edition for Android development.]]></description>
			<content:encoded><![CDATA[<p>Eclipse sucks!</p>
<p>Sorry to all Eclipse lovers, I just hate developing in Eclipse. Coming from Visual Studio and XCode, I just felt that eclipse was not responsive enough for Android development. I started my research for a good alternative. I even contemplated building everything manually using TextMate. But I think I finally found some good Android development tool that does not suck. Its IntelliJ IDEA and I use their free community edition. IDEA can open your eclipse projects and works seamlessly with Android emulator.</p>
<p>Downloading:</p>
<p>Download IntelliJ IDEA community edition from <a href="http://www.jetbrains.com">http://www.jetbrains.com</a> and install it on your platform. The rest of the post is for Mac OSX Lion. But it should be similar for others platforms.</p>
<p>Setting Up:</p>
<p>First thing you would do is download the android SDK and install some where. I put mine @</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>Users<span style="color: #000000; font-weight: bold;">/</span>gavi<span style="color: #000000; font-weight: bold;">/</span>work<span style="color: #000000; font-weight: bold;">/</span>android-sdk-mac</pre>
</div>
</div>
<p>Add the android path in your profile. Edit your .bash_profile</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_profile</pre>
</div>
</div>
<p>Add SDK tools paths</p>
<p>export PATH=$PATH:/Users/gavi/work/android-sdk-mac/platform-tools:/Users/gavi/work/android-sdk-mac/tools</p>
<p>Save the file and execute </p>
<pre>
source ~/.bash_profile
android
</pre>
<p>Then you can download the necessary SDKs you need(Android 2.3.3, ICS etc). Here is a screen shot.<br />
<a href="http://blog.objectgraph.com/wp-content/uploads/2011/12/android_sdk_manager.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/12/android_sdk_manager.png" alt="android_sdk_manager" title="android_sdk_manager" width="500" class="alignnone size-full wp-image-2135" /></a></p>
<p>Once your sdk is setup. Start up IntelliJ</p>
<p>The first thing you want to do is setup your Java SDK. On Mac,  The path is similar to below</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Java<span style="color: #000000; font-weight: bold;">/</span>JavaVirtualMachines<span style="color: #000000; font-weight: bold;">/</span>1.6.0.jdk<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Home</pre>
</div>
</div>
<p>Then you can add Android SDKs. Here is a quick video I recorded which makes it simple.</p>
<p><iframe src="http://player.vimeo.com/video/34385790?title=0&amp;byline=0&amp;portrait=0" width="600" height="375" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<p><a href="http://vimeo.com/34385790">Setting Up IntelliJ SDKs for Android</a> from <a href="http://vimeo.com/objectgraph">ObjectGraph LLC</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Thats it. Just have fun developing for Andorid!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/12/30/intellij-android-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Page Methods and jQuery</title>
		<link>http://blog.objectgraph.com/index.php/2011/12/30/asp-net-page-methods-and-jquery/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/12/30/asp-net-page-methods-and-jquery/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 20:23:09 +0000</pubDate>
		<dc:creator>bozena</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[pagemethod]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2095</guid>
		<description><![CDATA[ASP.NET has a very nice architecture to pack all backend AJAX methods and jQuery in the same ASPX file. In this blog post I show a simple way to connect the dots between ASP.NET Page methods and jQuery on the client.
]]></description>
			<content:encoded><![CDATA[<p>ASP.NET has a very nice architecture to pack all backend AJAX methods and jQuery in the same ASPX file.<br />
Lets say you have a simple Page Method like below. You need to include the &#8220;System.Web.Services&#8221; and declare your method as WebMethod.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
</pre>
</td>
<td class="code">
<pre class="csharp" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>WebMethod<span style="color: #000000;">&#93;</span>
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">int</span> Sum<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> a, <span style="color: #FF0000;">int</span> b<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> a <span style="color: #008000;">+</span> b<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
<p>Make sure your page method is static</p>
<p>The JQuery way of calling this function would be something similar to this.</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre>
</td>
<td class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><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: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#btnSum&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><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: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;POST&quot;</span><span style="color: #339933;">,</span>
            url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Default.aspx/Sum&quot;</span><span style="color: #339933;">,</span>
            data<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;{'a':&quot;</span> <span style="color: #339933;">+</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txtA&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;,'b':&quot;</span> <span style="color: #339933;">+</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#txtB&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;}&quot;</span><span style="color: #339933;">,</span>
            contentType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;application/json; charset=utf-8&quot;</span><span style="color: #339933;">,</span>
            dataType<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;json&quot;</span><span style="color: #339933;">,</span>
            success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#lblOutput&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>result.<span style="color: #660066;">d</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: #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>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>In Line 5, I am assuming the file name is Default.aspx and thus you call Default.aspx/Sum. If you notice on line 10, the result is enclosed in a json object called &#8220;d&#8221;. So to unpack you would have to call result.d</p>
<p>HTML Form would be something like this</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
</pre>
</td>
<td class="code">
<pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;form1&quot;</span> runat<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;server&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
          A: <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;txtA&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
          B: <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;txtB&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Sum&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;btnSum&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;lblOutput&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>You can download the file below</p>
<p><a href='http://blog.objectgraph.com/wp-content/uploads/2011/12/Default.aspx.zip'><img src="http://blog.objectgraph.com/wp-includes/images/crystal/archive.png">Page Methods Sample</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/12/30/asp-net-page-methods-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating ShareKit + ASIHTTPRequest for TwitPic</title>
		<link>http://blog.objectgraph.com/index.php/2011/12/27/integrating-sharekit-and-asihttprequestwith-twitpic/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/12/27/integrating-sharekit-and-asihttprequestwith-twitpic/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 20:08:21 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitpic]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2080</guid>
		<description><![CDATA[ShareKit (2.0 is here) is a nice SNS library to make your iPhone development life easy. Dropping the folder int your project and enable share in a few lines of codes. I&#8217;ve been using TwitPic for twitter user to share their image but ShareKit uses img.ly as default. TwitPic is better for me in terms [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://getsharekit.com/">ShareKit</a> (<a href="https://github.com/ShareKit/ShareKit">2.0 is here</a>) is a nice SNS library to make your iPhone development life easy. Dropping the folder int your project and enable share in a few lines of codes. I&#8217;ve been using TwitPic for twitter user to share their image but ShareKit uses img.ly as default. TwitPic is better for me in terms of supported formats and the simplicity; however, the recent OAuth things make so complicated. I&#8217;m not sure OAuth really contributing more secure authentication and I&#8217;m not sure SNS needs that high-level security system (people just upset after Obama&#8217;s account hacked?). Anyway, I miss TwitPic&#8217;s simple API back then. Another great network library, <a href="http://allseeing-i.com/ASIHTTPRequest/">ASIHTTPRequest</a> by Ben, is make everyone&#8217;s life easier too.  In this article, I would like to explain how to modify ShareKit to change the image uploading service to TwitPic. You can also read this article as &#8220;How to integrate Twitter Image upload service without bothering complicated OAuth mechanism?&#8221;</p>
<p>Step 1. Add <a href="http://allseeing-i.com/ASIHTTPRequest/">ASIHTTPRequest</a> in your project.</p>
<p>Step 2. Add <a href="http://getsharekit.com/">ShareKit</a> in your project.</p>
<p>Step 3. Get TwitPic application key and add it in SHKConfig.h</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#define SHKTwitPicKey				@&quot;a2f2c8902414d2c624d10403463c50c9&quot;</span></pre>
</div>
</div>
<p>Step 4. Replace codes around sendImage function in ShareKit > Sharers > Services > Twitter > SHKTwitter.m</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;ASIHTTPRequest.h&quot;</span>
<span style="color: #6e371a;">#import &quot;ASIFormDataRequest.h&quot;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>sendImage <span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://api.twitpic.com/1/uploadAndPost.json&quot;</span><span style="color: #002200;">&#93;</span>;
	ASIFormDataRequest <span style="color: #002200;">*</span>req <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>ASIFormDataRequest requestWithURL<span style="color: #002200;">:</span>url<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addPostValue<span style="color: #002200;">:</span>SHKTwitPicKey forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;key&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addPostValue<span style="color: #002200;">:</span>consumerKey forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;consumer_token&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addPostValue<span style="color: #002200;">:</span>SHKTwitterSecret forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;consumer_secret&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addPostValue<span style="color: #002200;">:</span>accessToken.key forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;oauth_token&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addPostValue<span style="color: #002200;">:</span>accessToken.secret forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;oauth_secret&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addPostValue<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>item customValueForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;status&quot;</span><span style="color: #002200;">&#93;</span> forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;message&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req addData<span style="color: #002200;">:</span>UIImageJPEGRepresentation<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>item image<span style="color: #002200;">&#93;</span>, <span style="color: #2400d9;">0.8</span><span style="color: #002200;">&#41;</span> forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;media&quot;</span><span style="color: #002200;">&#93;</span>;
	req.requestMethod <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;POST&quot;</span>;
	<span style="color: #002200;">&#91;</span>req setDelegate<span style="color: #002200;">:</span>self<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>req startAsynchronous<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">return</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>requestFinished<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>ASIHTTPRequest <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>request<span style="color: #002200;">&#123;</span>
	<span style="color: #11740a; font-style: italic;">//NSString *responseString = [request responseString]; // do json parsing if you want.</span>
	<span style="color: #002200;">&#91;</span>self sendDidFinish<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">// remove the spining shit</span>
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>requestFailed<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>ASIHTTPRequest <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>request<span style="color: #002200;">&#123;</span>
<span style="color: #11740a; font-style: italic;">//	NSError *error = [request error];</span>
	<span style="color: #002200;">&#91;</span>self sendDidFinish<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">// remove the spining shit</span>
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<p>Step 4. Call Twitter service from ShareKit like:</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">	SHKItem <span style="color: #002200;">*</span>item <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>SHKItem image<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIImage imageWithContentsOfFile<span style="color: #002200;">:</span>mFileName<span style="color: #002200;">&#93;</span> title<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Look at this picture!&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>SHKTwitter shareItem<span style="color: #002200;">:</span>item<span style="color: #002200;">&#93;</span>;</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/12/27/integrating-sharekit-and-asihttprequestwith-twitpic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frosty Camera iPhone App for this Winter Season</title>
		<link>http://blog.objectgraph.com/index.php/2011/11/16/frosty-camera/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/11/16/frosty-camera/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 16:46:22 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2053</guid>
		<description><![CDATA[Winter is here! Let&#8217;s forget about the Global Warming, and enjoy the snowy Holidays with our newly released Frosty Camera App. Frosty Camera Free lets you take frosty photos of your family, friends and even yourself. Apply our special photo effects and frosty frames in Real Time.Watch as Frosty Camera transforms the world around you [...]]]></description>
			<content:encoded><![CDATA[<p>Winter is here! Let&#8217;s forget about the Global Warming, and enjoy the snowy Holidays with our newly released Frosty Camera App. Frosty Camera Free lets you take frosty photos of your family, friends and even yourself. Apply our special photo effects and frosty frames in Real Time.Watch as Frosty Camera transforms the world around you into ICE AGE.</p>
<p>Tired of taking the same old normal pictures? Transform yourself into frozen snowman. Create super frosty photos in Real Time and share them with families and friends. Choose from 9 unique icy frames to style your photos and share with your favorite social networking service. You can even send frosty photos as seasonal greetings via email. So no reason to waiting around; Download the Frosty Camera Now!</p>
<p>Frosty Photo includes up to 4 different photo effects such as:<br />
- Snowman<br />
- Blue Ice<br />
- Frosting<br />
- Icy Night<br />
Our Frosty Photo app has over 9 unique frames like:<br />
- Blue Ice<br />
- Frozen Photo Frame<br />
- Crack Ice frame<br />
- Smokey<br />
- etc&#8230;</p>
<p>Frosty Photo also has additional features such as:<br />
- High resolution frames and phto effects which support iPhone 4 and 4S Retina display<br />
- Share the photos you’ve taken to Facebook<br />
- Tweet and upload your photo to Twitter<br />
- Share with your favorite social networking service<br />
- Save the picture to your photo album<br />
- Send the photo to your friends via email<br />
- Multitasking support via iOS<br />
New frames will be added on an ongoing basis. Be on the lookout for the next update to have access to even more frames in the future.</p>
<p><a href="http://itunes.apple.com/us/app/frosty-camera-free-christmas/id478602537?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="Frosty Camera" /></a></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/11/ScreenShotBlog011.png" title="Snow Angle" width="300" height="564" class="size-full wp-image-2066" /><img src="http://blog.objectgraph.com/wp-content/uploads/2011/11/ScreenShotBlog02.png" alt="Blue ICe" title="Blue ICe" width="300" height="564" class="alignleft size-full wp-image-2069" /></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/11/ScreenShotBlog03.png" alt="Ice Queen" title="Ice Queen" width="300" height="564" class="alignleft size-full wp-image-2071" /><img src="http://blog.objectgraph.com/wp-content/uploads/2011/11/ScreenShotBlog04.png" alt="Green Ice" title="Green Ice" width="300" height="564" class="alignleft size-full wp-image-2072" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/11/16/frosty-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geoweb summit 2011</title>
		<link>http://blog.objectgraph.com/index.php/2011/11/11/geoweb-summit-2011/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/11/11/geoweb-summit-2011/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 20:14:55 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[webapps]]></category>
		<category><![CDATA[Geo]]></category>
		<category><![CDATA[geography]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[lbs]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=2038</guid>
		<description><![CDATA[We just came back from Geoweb Summit 2011 in Brooklyn. The event was energetic, and we are glad to attend the meaningful panel discussions on both technology and business strategy. As a GIS Analyst / Developer, I always ask myself the following question: &#8220;What is the next generation of legacy desktop GIS systems?&#8221; I like NY City&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>We just came back from <a href="http://geowebsummit.com/">Geoweb Summit 2011</a> in Brooklyn. The event was energetic, and we are glad to attend the meaningful panel discussions on both technology and business strategy. As a GIS Analyst / Developer, I always ask myself the following question: &#8220;What is the next generation of legacy desktop GIS systems?&#8221; I like NY City&#8217;s mashup approach to provide an answer to my question. One of the panelist, Colin Reilly, is from the <a href="http://www.nyc.gov/html/doitt/html/home/home.shtml">New York DoITT </a>and he leads campaigns like <a href="http://2011.nycbigapps.com/">New York Big Apps</a>. This is an important movement since only the government and big organizations used to exclusively handle GIS data on desktop software like ArcGIS.  This movement opens up and attracts more and more independent developers and startups to learn more GIS knowledge through many of those  mush-up (web or mobile) projects. It&#8217;s not about the government&#8217;s data transparency but also the movement starts removing technical boundaries, such as file format differences; it&#8217;s moving toward to the semantic web world. It&#8217;s is also worth to mention that grassroots mapping community, <a href="http://www.greenmap.org">Green Map Systems</a>, contributes awareness and literacy of GIS data through their mapping efforts. Through a couple of different panel discussions, we observed the &#8220;data industry&#8221; accelerates their business intelligence aspects of their business models on top of their GIS data. For example, GIS data provider, <a href="http://www.skyhookwireless.com/">Skyhook</a>, made a partnership deal with <a href="http://www.placeiq.com">PlaceIQ</a>, which runs location based analysis service. Finally, the Augmented Reality (AR) panel discussions revealed a few challenges about how to deliver useful information to users. In my opinion, AR is so fancy and catchy for investors because of their Ads opportunity (remember, Second Life?); however, I still feel missing a killer feature in this platform. For example, yes, I can see my iPhone like a scope, and I can find out the subway stations around me but is this really better than 2D map?</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151334.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151334.jpg" alt="20111111-151334.jpg" width="584" height="130" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151401.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151401.jpg" alt="20111111-151401.jpg" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151416.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151416.jpg" alt="20111111-151416.jpg" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151435.jpg"><img class="alignnone size-full" src="http://blog.objectgraph.com/wp-content/uploads/2011/11/20111111-151435.jpg" alt="20111111-151435.jpg" /></a></p>
<p>Geoweb Summit Home Page</p>
<p><a href="http://geowebsummit.com/">http://geowebsummit.com/</a></p>
<p>Don&#8217;t forget to check our Geo-Website</p>
<p><a href="http://geo.objectgraph.com/">http://geo.objectgraph.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/11/11/geoweb-summit-2011/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Scary Camera &#8211; Our new iPhone App Released!</title>
		<link>http://blog.objectgraph.com/index.php/2011/10/20/scary-camera-our-new-iphone-app-released/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/10/20/scary-camera-our-new-iphone-app-released/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 01:52:18 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[ghost]]></category>
		<category><![CDATA[Halloween]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[monster]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[picture]]></category>
		<category><![CDATA[spooky]]></category>
		<category><![CDATA[zombie]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1982</guid>
		<description><![CDATA[Get ready for a scary Halloween! Scary Camera FREE lets you take spooky photos of your family, friends and even yourself. Apply our special photo effects and scary frames in Real Time. Watch as Scary Camera transforms the world around you into a real life horror show. Show off your creativity with our special photo [...]]]></description>
			<content:encoded><![CDATA[<p>Get ready for a scary Halloween! Scary Camera FREE lets you take spooky photos of your family, friends and even yourself. Apply our special photo effects and scary frames in Real Time. Watch as Scary Camera transforms the world around you into a real life horror show. Show off your creativity with our special photo effects and make your own haunted photos. Scare all of your friends this Halloween!</p>
<p>Tired of taking the same old normal pictures? Add something scary to it in Real Time.<br />
Make your pictures look like they came out of the grundge movie.<br />
Choose from over 20 different horror frames to style your photos.<br />
Mix and match these frames with up to 4 different photo effects to make your own scary effects.</p>
<p>Scary Photo includes up to 4 different photo effects such as:<br />
- Zombie<br />
- Shocking<br />
- Horror<br />
- Black and White</p>
<p>Our Scary Photo app has over 20 different horror frames like:<br />
- Grunge<br />
- Bloody<br />
- Spider Web<br />
- Smokey<br />
- etc&#8230;</p>
<p><a href="http://itunes.apple.com/us/app/scary-camera-free-create-halloween/id470880623?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="Scary Camera" /></a></p>
<p>Scary Photo also has additional features such as:<br />
- High resolution frames and phto effects which support iPhone 4 and 4S Retina display<br />
- Share the photos you&#8217;ve taken to Facebook<br />
- Tweet and upload your photo to Twitter<br />
- Share with your favorite social networking service<br />
- Save the picture to your photo album<br />
- Send the photo to your friends via email<br />
- Multitasking support via iOS</p>
<p>New frames will be added on an ongoing basis. Be on the lookout for the next update to have access to even more frames in the future.</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/scary_camera_iphone4_ss01.png" alt="psycho guy" width="300" /><img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/scary_camera_iphone4_ss02.png" alt="bruce lee?" width="300" /><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/Screenshot01.png" alt="RedCry" title="Screenshot01" width="300" height="564" /><img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/Screenshot04.png" alt="WhatDidyousay" title="WhatDidyousay" width="300" height="564" class="alignleft size-full wp-image-2026" /><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/Screenshot03.png" alt="LeftForDead" title="LeftForDead" width="300" height="564"  /><img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/Screenshot05.png" alt="HellCry" title="HellCry" width="300" height="564" class="alignleft size-full wp-image-2028" /><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/10/Screenshot02.png" alt="LaughingZombies" title="LaughingZombies" width="564" height="300" class="alignleft size-full wp-image-2023" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/10/20/scary-camera-our-new-iphone-app-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Version of iRetroPhone Available &#8211; The Original And Favorite Rotary Dialer</title>
		<link>http://blog.objectgraph.com/index.php/2011/09/13/new-version-of-iretrophone-available-the-original-and-favorite-rotary-dialer/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/09/13/new-version-of-iretrophone-available-the-original-and-favorite-rotary-dialer/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 20:04:09 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[iRetroPhone]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[rotary dialer]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1959</guid>
		<description><![CDATA[New updated iRetroPhone with retina graphics has been released on iTunes App Store]]></description>
			<content:encoded><![CDATA[<p>Kiichi started playing around with the iPhone SDK back in March of 2008 and we needed an idea for our very first native iPhone application. Our good friend Chris League mentioned in a conversation that one of his students said how the old rotary dialer phones were much more reliable than cell phones of today. The idea immediately clicked that we needed to build a Rotary dialer app for iPhone and it should be available on Day 1 of the App store Launch.</p>
<p>We achieved that. iRetroPhone was born and it was reviewed by NYTimes back in 2008. Since then we only made minor changes. We moved on to other apps such as <a href="http://itunes.apple.com/us/app/isamegame/id291197345?mt=8">iSameGame</a>, <a href="http://itunes.apple.com/us/app/iseismometer/id304190739?mt=8">iSeismometer</a>, <a href="http://itunes.apple.com/us/app/geo-measure-map-area-distance/id451326903?mt=8">Geo Measure</a>, <a href="http://itunes.apple.com/us/app/age-test-test-your-ear-age/id321825050?mt=8">Age Test</a> etc, but our love for iRetroPhone was never diminished. </p>
<p>I am happy to report a new version of iRetroPhone with Retina graphics and the same simple user interface. Here are some screen shots with both the themes.</p>
<table>
<tr>
<td><a href="http://blog.objectgraph.com/wp-content/uploads/2011/09/iretro_ss1.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/09/iretro_ss1_300.png"></a></td>
<td><a href="http://blog.objectgraph.com/wp-content/uploads/2011/09/iretro_ss2.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/09/iretro_ss2_300.png"></a></td>
</tr>
<tr>
<td><a href="http://blog.objectgraph.com/wp-content/uploads/2011/09/iretro_ss3.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/09/iretro_ss3_300.png"></a></td>
<td>&nbsp;<a href="http://itunes.apple.com/us/app/iretrophone-rotary-dialer/id284700702?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png"></a></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/09/13/new-version-of-iretrophone-available-the-original-and-favorite-rotary-dialer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Geo Measure &#8211; App To Measure Areas And Distances For iPhone/iPad</title>
		<link>http://blog.objectgraph.com/index.php/2011/07/25/geo-measure-app-that-measure-areas-and-distances-for-iphone-ipad/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/07/25/geo-measure-app-that-measure-areas-and-distances-for-iphone-ipad/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 22:03:33 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[Geo]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[area]]></category>
		<category><![CDATA[distance]]></category>
		<category><![CDATA[iphone app]]></category>
		<category><![CDATA[measurement]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1923</guid>
		<description><![CDATA[We release an iPhone/iPad app that calculates geographic distances and areas via MapKit API]]></description>
			<content:encoded><![CDATA[<p>
Have you ever wondered &#8220;How much acreage is that farm?&#8221; or &#8220;What is the distance between your house and subway station?&#8221;. Are you curious to find out who has the most property in your neighborhood?<br/><br />
We have an app for that.
</p>
<p>
We are pleased to announce the launch of our new app for iOS devices.  This is a great tool for anyone who wants to find geographical areas or distances. Use the app for finding distances between far away places or just calculate the bike path before you actually attempt it.
</p>
<p>
This app is universal, it means the same binary will run on both iPhone and iPad.<br/><br />
<a href="http://itunes.apple.com/us/app/geo-measure-map-area-distance/id451326903?mt=8"><img src="http://www.iappphone.com/static/plain/images/appstore.png"/></a>
</p>
<p>Here are some other features:</p>
<ul>
<li>Measure Areas in Acres,Ares,Hectares,Square Feet,Square Yards,Square Meters,Square Miles,Square Kilometers</li>
<li>Measure distances in Kilometers,Miles,Meters,Feet,Miles,Nautical Miles,Yards</li>
<li>Easy to use navigation and measurement modes</li>
<li>Locally save and email data as KML. These KML files are also available via iTunes</li>
</ul>
<p>Demo Movie for iPad<br/></p>
<p><iframe width="640" height="510" src="http://www.youtube.com/embed/jqojuIWEsG0" frameborder="0" allowfullscreen></iframe></p>
<p>iPhone Screen shots</p>
<table>
<tr>
<td>
<a href="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_1.png"><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_thumb1.png" alt="gm_ip4_thumb1" title="gm_ip4_thumb3" width="300" height="428" class="alignnone size-full wp-image-1931" /><br />
</a>
</td>
<td>
<a href="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_2.png"><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_thumb2.png" alt="gm_ip4_thumb4" title="gm_ip4_thumb4" width="300" height="428" class="alignnone size-full wp-image-1931" /><br />
</a>
</td>
</tr>
<tr>
<td>
<a href="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_3.png"><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_thumb3.png" alt="gm_ip4_thumb3" title="gm_ip4_thumb3" width="300" height="428" class="alignnone size-full wp-image-1931" /><br />
</a>
</td>
<td>
<a href="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_4.png"><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/gm_ip4_thumb4.png" alt="gm_ip4_thumb4" title="gm_ip4_thumb4" width="300" height="428" class="alignnone size-full wp-image-1931" /><br />
</a>
</td>
</tr>
</table>
<p>iPad Screenshots</p>
<p>You can download the app at <a href="http://itunes.apple.com/us/app/geo-measure-map-area-distance/id451326903?mt=8">here</a>.</p>
<p>We are now #8 in ranking.</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/geo_measure.png"></p>
<p>We are on New and Noteworthy section of the App Store.</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/new_and_noteworthy_geo_measure1.png"></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/07/25/geo-measure-app-that-measure-areas-and-distances-for-iphone-ipad/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>OS X Lion Review &#8211; 3 things I love / hate</title>
		<link>http://blog.objectgraph.com/index.php/2011/07/22/os-x-lion-review-3-things-i-love-hate/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/07/22/os-x-lion-review-3-things-i-love-hate/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 14:39:18 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[lion]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1903</guid>
		<description><![CDATA[Mac OS X Lion (Version 10.7) is out , and according to Apple 1 Millions Lions are downloaded in the first day. There are plenty of reviews about pros and cons of the new OS. Here are my quick review on 3 things I love / Hate about the Lion. 1. Air Drop Finally easy [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Mac</strong> OS X Lion (Version 10.7) is out , and according to Apple 1 Millions Lions are downloaded in the first day. There are plenty of reviews about pros and cons of the new OS.</p>
<p>Here are my quick review on 3 things I love / Hate about the Lion.</p>
<p style="text-align: left;">
<p style="text-align: left;"><strong>1. Air Drop</strong></p>
<p>Finally easy to share files between macs. Even though not a replacement for your Dropbox, it is definitely a good start.</p>
<p><strong>pros: </strong>easy to share, no set up or configuration, auto discovery</p>
<p><strong>cons:</strong> no support to share over network yet, no group sharing</p>
<p><img class="alignleft size-large wp-image-1920" title="AirDrop" src="http://blog.objectgraph.com/wp-content/uploads/2011/07/AirDrop2-550x235.png" alt="AirDrop" width="550" height="235" /></p>
<p><strong>2. New Gestures</strong></p>
<p><img class="alignleft size-large wp-image-1915" title="Gestures" src="http://blog.objectgraph.com/wp-content/uploads/2011/07/Gestures-550x437.png" alt="Gestures" width="550" height="437" /></p>
<p><strong>pros: </strong>easy to switch between applications, better experiences (except default scrolling is a bit hard to get used to)</p>
<p><strong>cons:</strong> learning all gestures may be a bit hard to adjust for an average user</p>
<p><strong>3.  Name on the menu bar</strong></p>
<p><img class="alignleft size-full wp-image-1916" title="name01" src="http://blog.objectgraph.com/wp-content/uploads/2011/07/name011.png" alt="name01" width="357" height="74" /></p>
<p>Yes, I&#8217;m complaining about my name on the menu bar.</p>
<p><strong>pros:</strong> it is good if you forgot your own name.</p>
<p><strong>cons:</strong> the same as above. But it is easy to fix; just hold down the command key and drag your name to the desktop. poof it is gone.</p>
<p>There you have it. Three things I love/ hate about the Lion on my first day.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/07/22/os-x-lion-review-3-things-i-love-hate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iSeismometer &#8220;On The Fly&#8221; Released. Try this without Downloading An App.</title>
		<link>http://blog.objectgraph.com/index.php/2011/07/05/iseismometer-on-the-fly-released-try-this-without-downloading-an-app/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/07/05/iseismometer-on-the-fly-released-try-this-without-downloading-an-app/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 04:09:03 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[iSeismometer]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1881</guid>
		<description><![CDATA[Click here to go to <a href="http://m.iseismometer.com/">iSeismometer Web (m.iseismometer.com)</a>.

We created iSeismometer Web version which does not require you to download app from App Store. This is very simple version of our iSeismometer but it animate motions on your phone. Good news? It does works on iPad, Android, and Firefox on MacBook.
]]></description>
			<content:encoded><![CDATA[<div style="font-size:30px;line-height:200%">Click to try <a href="http://m.iseismometer.com/"><strong>iSeismometer</strong> (m.iseismometer.com)</a>. Enjoy!</div>
<p><br/><br/><br />
We created iSeismometer Web version which does not require you to download app from App Store. This is very simple version of our iSeismometer but it animate motions on your phone. Good news? It does works on iPad, Android, and Firefox on MacBook.</p>
<p><a href="http://m.iseismometer.com/"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/07/Photo-Jul-04-11-52-44-PM-366x550.png" alt="Photo Jul 04, 11 52 44 PM" title="Photo Jul 04, 11 52 44 PM" width="366" height="550" class="alignnone size-large wp-image-1883" /></a><br />
<br/><br />
<br/><br />
Compatibility Chart:</p>
<table>
<tr>
<td>iPhone 4</td>
<td>Good</td>
</tr>
<tr>
<td>iPad2</td>
<td>Good</td>
</tr>
<tr>
<td>Galaxy Tab 10.1</td>
<td>Good</td>
</tr>
<tr>
<td>Mac Firefox</td>
<td>Working &#8211; Missing one value</td>
</tr>
<tr>
<td>Mac Chrome</td>
<td>Does not crush but no animation</td>
</tr>
<tr>
<td>Mac Safari</td>
<td>Not working</td>
</tr>
</table>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/07/05/iseismometer-on-the-fly-released-try-this-without-downloading-an-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iSeismometer appeared on BBC</title>
		<link>http://blog.objectgraph.com/index.php/2011/06/25/iseismometer-appears-on-bbc/</link>
		<comments>http://blog.objectgraph.com/index.php/2011/06/25/iseismometer-appears-on-bbc/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 03:41:34 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iSeismometer]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[classroom]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1846</guid>
		<description><![CDATA[Our app, iSeismometer, to show slight motion on your iPhone / iPad was on BBC! They came to shoot a classroom at Long Island University because the app which I developed in the Earth Science classroom was used as one of the lab exercise. Our University distributed 6,000 iPads so far and it will be [...]]]></description>
			<content:encoded><![CDATA[<p>Our app, iSeismometer, to show slight motion on your iPhone / iPad was on BBC! They came to shoot a classroom at Long Island University because the app which I developed in the Earth Science classroom was used as one of the lab exercise. Our University distributed 6,000 iPads so far and it will be 10,000 by the next year. My team lead the development of the entire distribution system and the university app on it. </p>
<p><iframe src="http://player.vimeo.com/video/25541278?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff" width="640" height="512" frameborder="0"></iframe></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/06/IMG_60501.JPG"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/06/IMG_60501-550x410.jpg" alt="IMG_6050" title="IMG_6050" width="550" height="410" class="alignnone size-large wp-image-1857" /></a></p>
<p>Dr. Kennelly introduced about iSeismometer and one of lab exercise in a Earth Science classroom. My interview was not used but I&#8217;m happy that he mention about my app and me in his comments.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/06/Screen-shot-2011-06-24-at-1.13.23-AM1.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/06/Screen-shot-2011-06-24-at-1.13.23-AM1-550x360.png" alt="Screen shot 2011-06-24 at 1.13.23 AM" title="Screen shot 2011-06-24 at 1.13.23 AM" width="550" height="360" class="alignnone size-large wp-image-1859" /></a></p>
<p><iframe width="550" height="800" src="http://www.youtube.com/embed/bWzHu-nkB28" frameborder="0" allowfullscreen></iframe><br />
That was fun to see a lot of iPads in one place. See how they show shaking motions on the table.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/06/Screen-shot-2011-06-24-at-1.13.41-AM1.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/06/Screen-shot-2011-06-24-at-1.13.41-AM1-550x357.png" alt="Screen shot 2011-06-24 at 1.13.41 AM" title="Screen shot 2011-06-24 at 1.13.41 AM" width="550" height="357" class="alignnone size-large wp-image-1860" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2011/06/IMG_6055.JPG"><img src="http://blog.objectgraph.com/wp-content/uploads/2011/06/IMG_6055.JPG" alt="IMG_6055" title="IMG_6055" width="550" class="alignnone size-full wp-image-1852" /></a></p>
<p>Here is the behind the scene. This is how they set up the interview place.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2011/06/25/iseismometer-appears-on-bbc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

