<?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 Sep 2010 18:22:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iAge is available for free now!</title>
		<link>http://blog.objectgraph.com/index.php/2010/09/02/iage-is-available-for-free-now/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/09/02/iage-is-available-for-free-now/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 18:10:53 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[age]]></category>
		<category><![CDATA[ear]]></category>
		<category><![CDATA[iage]]></category>
		<category><![CDATA[mosquito]]></category>
		<category><![CDATA[Mosquito Ringtones]]></category>
		<category><![CDATA[Sounds]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1603</guid>
		<description><![CDATA[We just released a free version of iAge (a.k.a. EarAge) that plays stealth tone like mosquito sounds. Can you identify if it&#8217;s playing or not? Try to increase the pitch by rotating the dial in the middle.


Ultimate Sound Test [10000 hz - 1 hz]
Download this app from here: 
]]></description>
			<content:encoded><![CDATA[<p>We just released a free version of iAge (a.k.a. EarAge) that plays stealth tone like mosquito sounds. Can you identify if it&#8217;s playing or not? Try to increase the pitch by rotating the dial in the middle.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/09/iage_logo289137.jpg"><img class="alignnone size-full wp-image-1609" title="iage_logo289137" src="http://blog.objectgraph.com/wp-content/uploads/2010/09/iage_logo289137.jpg" alt="iage_logo289137" width="320" height="480" /></a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/igGroIcga3g?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/igGroIcga3g?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Ultimate Sound Test [10000 hz - 1 hz]</p>
<p>Download this app from here: <a href="http://itunes.apple.com/us/app/iage-free-test-your-ear-age/id387639161?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="App Store Download" width="190" height="62" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/09/02/iage-is-available-for-free-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New iRetroPhone Sneak Peek</title>
		<link>http://blog.objectgraph.com/index.php/2010/08/23/new-iretrophone-sneak-peek/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/08/23/new-iretrophone-sneak-peek/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:17:01 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iRetroPhone]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[iphone 4]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1593</guid>
		<description><![CDATA[We would like to show a preview of the new version of iRetroPhone for iPhone 4. This is high-res version and it will be more sleek design. iRetroPhone was one of first 500 apps that were available at when App Store launched in July 10, 2008. It was covered by New York Times and this [...]]]></description>
			<content:encoded><![CDATA[<p>We would like to show a preview of the new version of iRetroPhone for iPhone 4. This is high-res version and it will be more sleek design. iRetroPhone was one of first 500 apps that were available at when <a href="http://en.wikipedia.org/wiki/App_Store">App Store launched in July 10, 2008</a>. It was covered by New York Times and this  is still the best novelty app in our portfolio.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/08/iretrophonehd_3.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2010/08/iretrophonehd_3.png" alt="iretrophonehd_3" title="iretrophonehd_3" width="640" height="960" class="alignnone size-full wp-image-1594" /></a></p>
<p><a href="http://iphone.objectgraph.com/iretrophone/itunes/"><img alt="" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" style="max-width: 800px;"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/08/23/new-iretrophone-sneak-peek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad 10 pack unboxing</title>
		<link>http://blog.objectgraph.com/index.php/2010/08/13/ipad-10-pack-unboxing/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/08/13/ipad-10-pack-unboxing/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 16:36:59 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1582</guid>
		<description><![CDATA[iPad 10 pack unboxing]]></description>
			<content:encoded><![CDATA[<p>You could buy iPad&#8217;s in bulk from Apple. They come in 10 packs with devices and chargers separated. Here are some pics of the un boxing. The chargers are in a separate box</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/08/IMG_1027.jpg" alt="IMG_1027" title="IMG_1027" width="484" height="648" class="alignnone size-full wp-image-1587" /></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/08/IMG_1028.jpg" alt="IMG_1027" title="IMG_1028" width="484" height="648" class="alignnone size-full wp-image-1587" /></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/08/IMG_1030.jpg" alt="IMG_1027" title="IMG_1030" width="484" height="648" class="alignnone size-full wp-image-1587" /></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/08/IMG_1031.jpg" alt="IMG_1027" title="IMG_1031" width="484" height="648" class="alignnone size-full wp-image-1587" /></p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/08/IMG_1032.jpg" alt="IMG_1027" title="IMG_1032" width="484" height="648" class="alignnone size-full wp-image-1587" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/08/13/ipad-10-pack-unboxing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iSeismometer Data Explained</title>
		<link>http://blog.objectgraph.com/index.php/2010/07/18/1572/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/07/18/1572/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 19:10:21 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iSeismometer]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[earthquake]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[shake]]></category>
		<category><![CDATA[usgs]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1572</guid>
		<description><![CDATA[I wrote a new page to explain how iSeismoemter extract the values. This could be helpful when you look at the data and understand the difference between high-pass filter on and off.

Check the article from here : Gravity and Device Orientation
]]></description>
			<content:encoded><![CDATA[<p>I wrote a new page to explain how iSeismoemter extract the values. This could be helpful when you look at the data and understand the difference between high-pass filter on and off.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/07/dg8k4grr_110ggmb6rc4_b.png"><img class="alignnone size-full wp-image-1571" title="dg8k4grr_110ggmb6rc4_b" src="http://blog.objectgraph.com/wp-content/uploads/2010/07/dg8k4grr_110ggmb6rc4_b.png" alt="dg8k4grr_110ggmb6rc4_b" width="361" height="429" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/07/dg8k4grr_110ggmb6rc4_b.png"></a>Check the article from here : <a href="http://www.iseismometer.com/tutorial/gravity-and-device-orientations/">Gravity and Device Orientation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/07/18/1572/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cat Piano HD  &#8211; #2 in Japan / 猫ピアノHDが２位になりました</title>
		<link>http://blog.objectgraph.com/index.php/2010/06/21/cat-piano-hd/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/06/21/cat-piano-hd/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 15:53:33 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[kitten]]></category>
		<category><![CDATA[piano]]></category>
		<category><![CDATA[ねこ]]></category>
		<category><![CDATA[ネコ]]></category>
		<category><![CDATA[ピアノ]]></category>
		<category><![CDATA[猫]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1545</guid>
		<description><![CDATA[[English]
Again, our cat piano went oversea. In Japan, our app became #2 position and this is next to iBook.

Download it from iTuens NOW!
[Japanese]
猫ピアノがiTunesで２位になりました。iBookの次です。

今すぐダウンロード！

[Movie]

【ニコニコ動画】ノル3匹 #282「猫の鳴き声を出すiPadアプリの反応を見てみた」

【ニコニコ動画】ノル3匹 #282「猫の鳴き声を出すiPadアプリの反応を見てみた」
[Links]

http://www.macotakara.jp/blog/tb.php?ID=8516
http://news.livedoor.com/article/detail/4833313/
http://www.mdn.co.jp/di/newstopics/13737/

]]></description>
			<content:encoded><![CDATA[<p>[English]</p>
<p>Again, our cat piano went oversea. In Japan, our app became #2 position and this is next to iBook.</p>
<p><a href="http://itunes.apple.com/us/app/cat-piano-free-hd/id376752605?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="App Store Download" width="190" height="62" /></a></p>
<p><a href="http://itunes.apple.com/us/app/cat-piano-free-hd/id376752605?mt=8">Download it from iTuens NOW!</a></p>
<p>[Japanese]</p>
<p>猫ピアノがiTunesで２位になりました。iBookの次です。</p>
<p><a href="http://itunes.apple.com/jp/app/cat-piano-free-hd/id376752605?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="App Store Download" width="190" height="62" /></a></p>
<p><a href="http://itunes.apple.com/jp/app/cat-piano-free-hd/id376752605?mt=8">今すぐダウンロード！</a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/06/mzl.fhbvexyo.480x480-75.jpg"><img class="alignnone size-full wp-image-1548" title="mzl.fhbvexyo.480x480-75" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/mzl.fhbvexyo.480x480-75.jpg" alt="mzl.fhbvexyo.480x480-75" width="480" height="360" /></a></p>
<p>[Movie]<br />
<br/><br />
<a target="_blank" href="http://www.nicovideo.jp/watch/sm11134496">【ニコニコ動画】ノル3匹 #282「猫の鳴き声を出すiPadアプリの反応を見てみた」</a></p>
<p><br/><br />
<script type="text/javascript" src="http://ext.nicovideo.jp/thumb_watch/sm11134496"></script><noscript><a href="http://www.nicovideo.jp/watch/sm11134496">【ニコニコ動画】ノル3匹 #282「猫の鳴き声を出すiPadアプリの反応を見てみた」</a></noscript></p>
<p>[Links]<br />
<br/></p>
<p><a href="http://www.macotakara.jp/blog/tb.php?ID=8516">http://www.macotakara.jp/blog/tb.php?ID=8516</a><br/><br />
<a href="http://news.livedoor.com/article/detail/4833313/">http://news.livedoor.com/article/detail/4833313/</a><br/></p>
<p><a href="http://www.mdn.co.jp/di/newstopics/13737/">http://www.mdn.co.jp/di/newstopics/13737/</a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/06/Screen-shot-2010-06-17-at-3.37.29-PM.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2010/06/Screen-shot-2010-06-17-at-3.37.29-PM.png" alt="Screen shot 2010-06-17 at 3.37.29 PM" title="Screen shot 2010-06-17 at 3.37.29 PM" width="731" height="266" class="alignnone size-full wp-image-1562" /></a><a href="http://blog.objectgraph.com/wp-content/uploads/2010/06/Picture-11.png"><img class="alignnone size-full wp-image-1547" title="Picture 1" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/Picture-11.png" alt="Picture 1" width="400"  /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/06/21/cat-piano-hd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally a good telugu unicode font for iPhone</title>
		<link>http://blog.objectgraph.com/index.php/2010/06/18/finally-a-good-telugu-unicode-font-for-iphone/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/06/18/finally-a-good-telugu-unicode-font-for-iphone/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 01:35:08 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iphone development]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1382</guid>
		<description><![CDATA[Good telugu font support in iOS 4]]></description>
			<content:encoded><![CDATA[<p>One thing that was bothering me was lack of a good unicode font for telugu. Telugu being my first language, I was disappointed. But I just upgraded to iPhone 4.0 and was pleasantly surprised to find a good telugu unicode font. Here are the before and after pictures.<br />
<br/><br />
<br/><br />
<br/><br />
<br/></p>
<table>
<tr>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2010/06/photo-1.jpg" alt="photo-1" title="photo-1" width="320" height="480" class="alignnone size-full wp-image-1533" />
</td>
<td>
<img src="http://blog.objectgraph.com/wp-content/uploads/2010/06/photo.PNG" alt="photo" title="photo" width="320" height="480" class="alignnone size-full wp-image-1532" />
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/06/18/finally-a-good-telugu-unicode-font-for-iphone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>iPad SDK 3.2 Document Support</title>
		<link>http://blog.objectgraph.com/index.php/2010/06/14/ipad-sdk-3-2-document-support-1/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/06/14/ipad-sdk-3-2-document-support-1/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 19:23:18 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[application:didFinishLaunchingWithOptions:]]></category>
		<category><![CDATA[CFBundleDocumentTypes]]></category>
		<category><![CDATA[iPad Document Support]]></category>
		<category><![CDATA[UIApplicationLaunchOptionsURLKey]]></category>
		<category><![CDATA[UIDocumentInteractionController]]></category>
		<category><![CDATA[UIFileSharingEnabled]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1439</guid>
		<description><![CDATA[In this post, we&#8217;ll discuss about the new File-Sharing and Document Support features in iPhone OS 3.2. The new File-Sharing feature allows user to access /Document directory through iTunes. Users are able to move files from their computers to iPads or iPads to their computers by using this feature. The new Document Support feature allows [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, we&#8217;ll discuss about the new File-Sharing and Document Support features in iPhone OS 3.2. The new File-Sharing feature allows user to access <strong>/Document</strong> directory through iTunes. Users are able to move files from their computers to iPads or iPads to their computers by using this feature. The new Document Support feature allows an application to register its supportive file types to the system. This feature allows an application to redirect files to be opened in other applications. For an example: an application doesn&#8217;t know how to open a PDF document. This feature allows the PDF document to be opened in other applications which can open PDF format.</p>
<p>In the section 1, we discuss XCode configuration in order to enable the document sharing feature between computers and iPad via iTunes. In the section 2 and 3, we&#8217;ll be creating 2 applications to discuss about the new Document Support features between iPad Apps. Our Applications will be called<em> &#8220;DocumentOpener&#8221;</em> and <em>&#8220;DocumentReader&#8221;</em>. DocumentOpener will be simply redirect files to be opened in appropriate applications. DocumentReader will accept files that DocumentOpener redirected and display them.</p>
<h3>1. File Sharing with iTunes</h3>
<p>First, create a OS 3.2 view based project in XCode. We&#8217;ll add the File-Sharing support to this application first. Adding File-Sharing support is as simple as adding a new key in info.plist file.</p>
<p>Open your info.plist file and add the following key under <strong>Information Property List</strong>: &#8220;<strong>UIFileSharingEnabled</strong>&#8220;.</p>
<p>Right Click on the Value Type column and set it as boolean type.</p>
<p>Install the application on iPad and connect it to iTunes.</p>
<p>Go to the application in iTunes, and you should now be able to see /Document directory. You can now move around your files between your application and your computer through iTunes. Sometimes you may not see the /Document directory when you connect your iPad to iTunes. When this happens, you just simply need to disconnect and reconnect your iPad to iTunes again.</p>
<h3>2. Opening a document in other applications</h3>
<p>Next open up your xib file and add a <strong>toolbar</strong> and Bar Action Bar Button to your view.</p>
<p><img class="alignnone size-full wp-image-1451" title="DocOpenerXib" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/DocOpenerXib.png" alt="DocOpenerXib" width="364" height="260" /></p>
<p>In your Viewcontroller.h file add the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@interface</span> ipadDocOpenerViewController <span style="color: #002200;">:</span> UIViewController <span style="color: #002200;">&#123;</span>
IBOutlet UIBarButtonItem <span style="color: #002200;">*</span>mItem;
UIDocumentInteractionController <span style="color: #002200;">*</span>controller;
&nbsp;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>You need to retain the UIDocumentInteractionController or it won&#8217;t work properly.</p>
<p>UIDocumentInteractionController can have 4 types of menu:</p>
<ol>
<li>Quick View</li>
<li>Open In &#8220;the most recent or most view application&#8221;</li>
<li>Open In</li>
<li>Action</li>
</ol>
<h4>2.1 Open In &#8230;</h4>
<p><strong> </strong>OpenIn menu will allow user to select from a list of application  that can support the target document. In our viewController.h file we decleared a method:</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>IBAction<span style="color: #002200;">&#41;</span> clickOpen<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender<span style="color: #002200;">&#41;</span></pre></div></div>

<p>Let&#8217;s implement the method in our viewcontroller.m</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>IBAction<span style="color: #002200;">&#41;</span> clickOpen<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>sender <span style="color: #002200;">&#123;</span>
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>fileToOpen <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;License&quot;</span>  ofType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;pdf&quot;</span><span style="color: #002200;">&#93;</span>;
self.controller <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIDocumentInteractionController  interactionControllerWithURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> fileURLWithPath<span style="color: #002200;">:</span>fileToOpen<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
self.controller.delegate <span style="color: #002200;">=</span> self;
&nbsp;
CGRect navRect <span style="color: #002200;">=</span> self.navigationController.navigationBar.frame;
navRect.size <span style="color: #002200;">=</span> CGSizeMake<span style="color: #002200;">&#40;</span>1500.0f, 40.0f<span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#91;</span>self.controller presentOptionsMenuFromRect<span style="color: #002200;">:</span>navRect inView<span style="color: #002200;">:</span>self.view  animated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>First, we create the NSString that stored the URL.Next we initialize  our UIDocumentINteractionConroller with that URL.  In the next step, we  create a rectangle to display our menu, and we present our  DocumentController menu inside our main view. Do not forget to make  appropriate connection in interface builder to our clickOpen method and<strong> </strong> UIBarButtonItem.</p>
<p>Here is our DocumentOpener in action:</p>
<p><img title="DocOpenerFinish" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/DocOpenerFinish2.png" alt="DocOpenerFinish" width="401" height="552" /></p>
<h4>2.2 Quick View</h4>
<p>iPhone OS 3.2 support in document open preview option for supported document type. What this mean is that even if your application doesn&#8217;t support the file type of a document, you can still open the document inside your application if the file type is  supported by iPhone OS (Example pdf, jpeg).  Yes, you can open a pdf file in any application by using quick view feature. Let&#8217;s add the quick view to our DocumentOpener menu.</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>UIViewController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>documentInteractionControllerViewControllerForPreview<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIDocumentInteractionController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>controller
<span style="color: #002200;">&#123;</span>
<span style="color: #a61390;">return</span> self;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>documentInteractionControllerViewForPreview<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIDocumentInteractionController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>controller
<span style="color: #002200;">&#123;</span>
<span style="color: #a61390;">return</span> self.view;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGRect<span style="color: #002200;">&#41;</span>documentInteractionControllerRectForPreview<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIDocumentInteractionController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>controller
<span style="color: #002200;">&#123;</span>
<span style="color: #a61390;">return</span> self.view.frame;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>QuickView In Action:</p>
<p><img class="alignnone size-full wp-image-1507" title="QuickVIew" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/QuickVIew.png" alt="QuickVIew" width="410" height="540" /><br />
This conclude the first part of our tutorial. In our next section,   we&#8217;ll create an application that act as document server. We&#8217;ll discuss   about how to open the documents coming from the DocumentOpener   application.</p>
<h3>3. Accepting Incoming Documents (Document Reader)</h3>
<p>Let&#8217;s create a iPhone OS 3.2 view based application called &#8220;<em>DocumentReader</em>&#8220;. To accept incoming documents, first we need to declare which document types that our application can support. Second we need to get the URL of the incoming file.</p>
<h4>3.1 Declearing support document types</h4>
<p>Open up your info.plist file. For our application, we&#8217;ll add PDF support, so our other applications can see our <em>DocumentReader</em> in their <em>OpenIn</em> menu.</p>
<p><img class="alignnone size-full wp-image-1511" title="infoPlistDocTypes" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/infoPlistDocTypes.png" alt="infoPlistDocTypes" width="594" height="442" /></p>
<p>UTI (Uniform Type Identifiers) make it easier to declare document types in iPhone OS environment. For more bout UTI, please visit the following link:</p>
<p>http://developer.apple.com/macosx/uniformtypeidentifiers.html</p>
<p>You can add multiple document support types in your info.plist file. As long as they are properly declare, other apps can easily pick up your application by this key automatically.</p>
<h4>3.2 Reading the URL of an incoming document</h4>
<p>To read the URL of a document coming from other application, all you need to do is implement &#8220;<em>applicationDidFinishLaunching</em>&#8221; and &#8220;<em>application</em> <em>didFinishLaunchingWithOptions</em>&#8221; methods.</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>applicationDidFinishLaunching<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application
<span style="color: #002200;">&#123;</span>
&nbsp;
<span style="color: #002200;">&#91;</span>window addSubview<span style="color: #002200;">:</span>viewController.view<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>window makeKeyAndVisible<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>application<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application didFinishLaunchingWithOptions<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSDictionary</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>launchOptions
<span style="color: #002200;">&#123;</span>
<span style="color: #002200;">&#91;</span>self applicationDidFinishLaunching<span style="color: #002200;">:</span>application<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>launchOptions <span style="color: #002200;">&amp;</span>amp;<span style="color: #002200;">&amp;</span>amp; <span style="color: #002200;">&#91;</span>launchOptions objectForKey<span style="color: #002200;">:</span>UIApplicationLaunchOptionsURLKey<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
<span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;Launch options:<span style="color: #2400d9;">\n</span>&quot;</span><span style="color: #002200;">&#41;</span>;
CFShow<span style="color: #002200;">&#40;</span>launchOptions<span style="color: #002200;">&#41;</span>;
&nbsp;
<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: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@&quot;</span>, <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSURL</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span>launchOptions objectForKey<span style="color: #002200;">:</span>UIApplicationLaunchOptionsURLKey<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
viewController.mLabel.text <span style="color: #002200;">=</span> filePath;
<span style="color: #002200;">&#91;</span>viewController.mWebView loadRequest<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURLRequest</span> requestWithURL<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSURL</span><span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#91;</span>launchOptions objectForKey<span style="color: #002200;">:</span>UIApplicationLaunchOptionsURLKey<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>In our code, we simply read incoming URL and display the file in a simple UIWebView. This conclude our tutorial on File-Sharing and Document Support. Happy Coding.</p>
<p>
Download Source Code (XCode Projects):<br />
<a href='http://blog.objectgraph.com/wp-content/uploads/2010/06/DocOpenerReader.zip'>DocOpenerReader</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/06/14/ipad-sdk-3-2-document-support-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fart Piano HD Released for iPad</title>
		<link>http://blog.objectgraph.com/index.php/2010/06/05/fart-piano-hd-released-for-ipad/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/06/05/fart-piano-hd-released-for-ipad/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 21:08:55 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[fart]]></category>
		<category><![CDATA[ifart]]></category>
		<category><![CDATA[piano]]></category>
		<category><![CDATA[prank]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1432</guid>
		<description><![CDATA[Our legendary app, Fart Piano Free was ported in iPad. It was finally approved after long review session&#8230; Here is the screenshot!

 Download it NOW!
In this version, we enhanced the feature. Not just wider keys but also different types.

Top &#8211; Wet
Bottom &#8211; Dry

Enjoy  
Additional Updates (6/7/2010):
#4 in Music Category &#38; #45  in the total ranking!

]]></description>
			<content:encoded><![CDATA[<p>Our legendary app, Fart Piano Free was ported in iPad. It was finally approved after long review session&#8230; Here is the screenshot!</p>
<p><a href="http://itunes.apple.com/app/fart-piano-free-hd/id364911407?mt=8"><img class="alignnone size-full wp-image-1433" title="photo_landscape" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/photo_landscape.png" alt="photo_landscape" width="537" height="403" /></a></p>
<p><a href="http://itunes.apple.com/app/fart-piano-free-hd/id364911407?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="App Store Download" width="190" height="62" /></a> <a href="http://itunes.apple.com/app/fart-piano-free-hd/id364911407?mt=8">Download it NOW!</a></p>
<p>In this version, we enhanced the feature. Not just wider keys but also different types.</p>
<ul>
<li>Top &#8211; Wet</li>
<li>Bottom &#8211; Dry</li>
</ul>
<p>Enjoy <img src='http://blog.objectgraph.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Additional Updates (6/7/2010):</p>
<p>#4 in Music Category &amp; #45  in the total ranking!</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/06/Picture-1.png"><img class="alignnone size-full wp-image-1437" title="Picture 1" src="http://blog.objectgraph.com/wp-content/uploads/2010/06/Picture-1.png" alt="Picture 1" width="471" height="179" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/06/05/fart-piano-hd-released-for-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Medical Apps #1 in Japan &#8211; 添付文書などiPadアプリが１位になりました</title>
		<link>http://blog.objectgraph.com/index.php/2010/05/28/medical-apps-1-in-japan-%e6%b7%bb%e4%bb%98%e6%96%87%e6%9b%b8%e3%81%aa%e3%81%a9ipad%e3%82%a2%e3%83%97%e3%83%aa%e3%81%8c%ef%bc%91%e4%bd%8d%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9f/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/05/28/medical-apps-1-in-japan-%e6%b7%bb%e4%bb%98%e6%96%87%e6%9b%b8%e3%81%aa%e3%81%a9ipad%e3%82%a2%e3%83%97%e3%83%aa%e3%81%8c%ef%bc%91%e4%bd%8d%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9f/#comments</comments>
		<pubDate>Fri, 28 May 2010 16:49:44 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[itunes]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1428</guid>
		<description><![CDATA[[English]
Our iPad apps got #1 position in Japan (Category Free, Paid, and Gross)!
[Japanese]
iPad向け医療用アプリ「添付文書」、「薬局方」が日本のカテゴリーランキングで無料・有料・売上全て１位になりました。



]]></description>
			<content:encoded><![CDATA[<p>[English]</p>
<p>Our iPad apps got #1 position in Japan (Category Free, Paid, and Gross)!</p>
<p>[Japanese]</p>
<p>iPad向け医療用アプリ「添付文書」、「薬局方」が日本のカテゴリーランキングで無料・有料・売上全て１位になりました。</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/ipad_medical_app_in_Japan.png"><img class="alignnone size-medium wp-image-1430" title="ipad_medical_app_in_Japan" src="http://blog.objectgraph.com/wp-content/uploads/2010/05/ipad_medical_app_in_Japan-50x300.png" alt="ipad_medical_app_in_Japan" width="50" height="300" /></a><a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/medical_apps_ipad_in_japan.png"></a></p>
<p><a href="http://itunes.apple.com/jp/app/id351532559?mt=8"><img class="alignnone size-medium wp-image-1429" title="medical_apps_ipad_in_japan" src="http://blog.objectgraph.com/wp-content/uploads/2010/05/medical_apps_ipad_in_japan-300x253.png" alt="medical_apps_ipad_in_japan" width="300" height="253" /></a></p>
<p><a href="http://itunes.apple.com/jp/app/id351532559?mt=8"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="App Store Download" width="190" height="62" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/05/28/medical-apps-1-in-japan-%e6%b7%bb%e4%bb%98%e6%96%87%e6%9b%b8%e3%81%aa%e3%81%a9ipad%e3%82%a2%e3%83%97%e3%83%aa%e3%81%8c%ef%bc%91%e4%bd%8d%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speechie App makes your iPhone Talk and its Free</title>
		<link>http://blog.objectgraph.com/index.php/2010/05/24/speechie-app-makes-your-iphone-talk-and-its-free/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/05/24/speechie-app-makes-your-iphone-talk-and-its-free/#comments</comments>
		<pubDate>Mon, 24 May 2010 22:01:29 +0000</pubDate>
		<dc:creator>gavi</dc:creator>
				<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1407</guid>
		<description><![CDATA[Speechie App for iPhone and iPod Touch makes your device speak what ever you want. ]]></description>
			<content:encoded><![CDATA[<p>We just released our newest product Speechie. It makes your iPhone/iPod Touch speak what ever you type.</p>
<p>Feel the power!</p>
<p>Then you can share your voice creation with your friends via twitter and email.</p>
<p>Best of all its free and it is small enough to be downloaded on your 3G. <a href="http://itunes.apple.com/us/app/speechie-free/id372608259?mt=8"><img src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png"></a></p>
<p>Check out some screen shots below.</p>
<p>This is where you type<br />
<a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie1.png"><br />
<img src="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie1.png" alt="speechie1" title="speechie1" width="207" height="385" class="alignnone size-full wp-image-1409" /><br />
</a></p>
<p>Select the voice you like and use the controls to change pitch, variance and speed. </p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie2.png"><br />
<a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie2.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie2.png" alt="speechie1" title="speechie1" width="207" height="385" class="alignnone size-full wp-image-1409" /><br />
</a></p>
<p>Once you are satisfied with your creation, upload to twitter or email the voice clip to your friends.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie3.png"><br />
<a href="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie3.png"><img src="http://blog.objectgraph.com/wp-content/uploads/2010/05/speechie2.png" alt="speechie1" title="speechie1" width="207" height="385" class="alignnone size-full wp-image-1409" /><br />
</a></p>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/05/24/speechie-app-makes-your-iphone-talk-and-its-free/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Encrypting / Decrypting / Base64 Encode / Decode in iPhone Objective-C</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/20/encrypting-decrypting-base64-encode-decode-in-iphone-objective-c/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/20/encrypting-decrypting-base64-encode-decode-in-iphone-objective-c/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 14:05:31 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[decrypt]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[encrypt]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1396</guid>
		<description><![CDATA[I went through websites to find good tricks to send  encrypted data to my server. Here is
encryption / decryption functions by Jeff and Base 64 functions by Cyrus
Include following headers:

#import &#34;NSData-AES.h&#34;
#import &#34;Base64.h&#34;

Implementation:

	NSString *password = @&#34;mypassword&#34;;
	NSString *str = @&#34;hello world 123&#34;; 
&#160;
	// 1) Encrypt
	NSLog&#40;@&#34;encrypting string = %@&#34;,str&#41;;
&#160;
	NSData *data = &#91;str dataUsingEncoding: NSASCIIStringEncoding&#93;;
	NSData *encryptedData = &#91;data [...]]]></description>
			<content:encoded><![CDATA[<p>I went through websites to find good tricks to send  encrypted data to my server. Here is<br />
<a href="http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html">encryption / decryption functions</a> by Jeff and <a href="http://www.cocoadev.com/index.pl?BaseSixtyFour">Base 64 functions</a> by Cyrus</p>
<p>Include following headers:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;NSData-AES.h&quot;</span>
<span style="color: #6e371a;">#import &quot;Base64.h&quot;</span></pre></div></div>

<p>Implementation:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>password <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;mypassword&quot;</span>;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>str <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hello world 123&quot;</span>; 
&nbsp;
	<span style="color: #11740a; font-style: italic;">// 1) Encrypt</span>
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;encrypting string = %@&quot;</span>,str<span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #400080;">NSData</span> <span style="color: #002200;">*</span>data <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>str dataUsingEncoding<span style="color: #002200;">:</span> NSASCIIStringEncoding<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSData</span> <span style="color: #002200;">*</span>encryptedData <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>data AESEncryptWithPassphrase<span style="color: #002200;">:</span>password<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">// 2) Encode Base 64</span>
	<span style="color: #11740a; font-style: italic;">// If you need to send over internet, encode NSData -&amp;gt; Base64 encoded string</span>
	<span style="color: #002200;">&#91;</span>Base64 initialize<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>b64EncStr <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>Base64 encode<span style="color: #002200;">:</span>encryptedData<span style="color: #002200;">&#93;</span>;
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Base 64 encoded = %@&quot;</span>,b64EncStr<span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">//////////////////// Send this data over network /////////////////////////////////////	</span>
&nbsp;
	<span style="color: #11740a; font-style: italic;">// 3) Decode Base 64</span>
	<span style="color: #11740a; font-style: italic;">// Then you can put that back like this</span>
	<span style="color: #400080;">NSData</span>	<span style="color: #002200;">*</span>b64DecData <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>Base64 decode<span style="color: #002200;">:</span>b64EncStr<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">// 4) Decrypt</span>
	<span style="color: #11740a; font-style: italic;">// This should be same before encode -&amp;gt; decode base 64</span>
	<span style="color: #11740a; font-style: italic;">//NSData *decryptedData = [encryptedData AESDecryptWithPassphrase:password];</span>
	<span style="color: #400080;">NSData</span> <span style="color: #002200;">*</span>decryptedData <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>b64DecData AESDecryptWithPassphrase<span style="color: #002200;">:</span>password<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> decryptedStr <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> alloc<span style="color: #002200;">&#93;</span> initWithData<span style="color: #002200;">:</span>decryptedData encoding<span style="color: #002200;">:</span>NSASCIIStringEncoding<span style="color: #002200;">&#93;</span>;
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;decrypted string = %@&quot;</span>,decryptedStr<span style="color: #002200;">&#41;</span>;</pre></div></div>

<p>Download Sample Code : <a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/CryptTest.zip">CryptTest</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/20/encrypting-decrypting-base64-encode-decode-in-iphone-objective-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Demo at Apple Store in Tokyo, Ginza 2</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/11/demo-at-apple-store-in-tokyo-ginza-2/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/11/demo-at-apple-store-in-tokyo-ginza-2/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 04:31:11 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[ginza]]></category>
		<category><![CDATA[medical]]></category>
		<category><![CDATA[tokyo]]></category>
		<category><![CDATA[アップルストア]]></category>
		<category><![CDATA[日本薬局方]]></category>
		<category><![CDATA[添付文書]]></category>
		<category><![CDATA[銀座]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1387</guid>
		<description><![CDATA[Here is report from our demo @ Apple Store in Tokyo:

Hiro demonstrated our medical apps.



A picture with Dr. Maki Sugimoto who is one of most important speaker in this event.
]]></description>
			<content:encoded><![CDATA[<p>Here is report from our demo @ <a href="http://blog.objectgraph.com/index.php/2010/04/09/demo-at-apple-store-in-tokyo-ginza/">Apple Store in Tokyo</a>:</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/GetAttachment.aspx.jpeg"><img class="alignnone size-full wp-image-1384" title="GetAttachment.aspx" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/GetAttachment.aspx.jpeg" alt="GetAttachment.aspx" width="312" height="234" /></a></p>
<p>Hiro demonstrated our medical apps.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/IMG_3831.JPG"><img class="alignnone size-full wp-image-1385" title="IMG_3831" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/IMG_3831.JPG" alt="IMG_3831" width="311" height="233" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/IMG_3842.jpg"><img class="alignnone size-full wp-image-1386" title="IMG_3842" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/IMG_3842.jpg" alt="IMG_3842" width="306" height="407" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/IMG_3827.jpg"><img class="alignnone size-full wp-image-1388" title="IMG_3827" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/IMG_3827.jpg" alt="IMG_3827" width="299" height="398" /></a></p>
<p>A picture with <a href="http://www.apple.com/science/profiles/maki/">Dr. Maki Sugimoto </a>who is one of most important speaker in this event.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/11/demo-at-apple-store-in-tokyo-ginza-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to add CoverFlow Effect on your iPhone App &#8211; OpenFlow</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/09/how-to-add-coverflow-effect-on-your-iphone-app-openflow/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/09/how-to-add-coverflow-effect-on-your-iphone-app-openflow/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 21:37:16 +0000</pubDate>
		<dc:creator>avinash</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[Cover Flow]]></category>
		<category><![CDATA[open flow]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1220</guid>
		<description><![CDATA[Hello all,
The main criteria of this post is to help you add a cool effect called the &#8220;cover flow/open flow&#8221; effect to any of your iphone apps. This is cool in two ways actually. One it adds animation kind of effect to your app and the other, its very easy to build too.
I got to [...]]]></description>
			<content:encoded><![CDATA[<p>Hello all,</p>
<p>The main criteria of this post is to help you add a cool effect called the <strong>&#8220;cover flow/open flow&#8221;</strong> effect to any of your iphone apps. This is cool in two ways actually. One it adds animation kind of effect to your app and the other, its very easy to build too.</p>
<p>I got to learn about this effect when I was working on my &#8220;pianos&#8221; app where in i&#8217;ll have bunch of animals to select which would be displayed as a menu using this &#8220;cover flow&#8221; effect. Once a particular animal is selected your piano view for that animal comes up. My piano app will be out soon and you can check that out. The source for this post is the link displayed below.</p>
<p>&#8220;http://fajkowski.com/blog/2009/08/02/openflow-a-coverflow-api-replacement-for-the-iphone/&#8221;</p>
<p>Based on his post I have simplified things further. He uses &#8220;flicker API&#8221; for the images in his &#8220;cover flow&#8221;  but in my version I would just use my own library of images so that this post would target the beginners. To begin with we should work with Photoshop a bit to generate your images. If your not acquainted with photoshop, never mind not a problem at all. This particular task with the photoshop just wants you to scale the  images you use in your library to size &#8220;225 * 225&#8243; applying <strong>&#8220;Free Transformation&#8221;.</strong> That&#8217;s all what you got to do. Once you got your images then your ready to go.</p>
<p><strong>Creating the project</strong></p>
<p><strong> </strong>Firstly Create a new &#8220;view based&#8221;  project with project name like &#8220;CoverFlow&#8221;.</p>
<p>Once you create a new project you would arrive at a screen shown below with predefined classes already generated for you.</p>
<p><img class="aligncenter size-medium wp-image-1310" title="Screen shot 2010-04-07 at 4.05.07 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-4.05.07-PM-300x212.png" alt="Screen shot 2010-04-07 at 4.05.07 PM" width="300" height="212" /></p>
<p><strong>Add the OpenFlow source code to your project</strong></p>
<p>You could get the &#8220;OpenFlow&#8221; source code from &#8220;<a onclick="javascript:pageTracker._trackPageview('a/apparentlogic.com');" href="http://apparentlogic.com/openflow">http://apparentlogic.com/openflow</a>&#8220;. Add the Openflow library to your project.</p>
<div id="attachment_1314" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-1314" href="http://blog.objectgraph.com/index.php/2010/04/09/how-to-add-coverflow-effect-on-your-iphone-app-openflow/screen-shot-2010-04-07-at-4-21-04-pm/"><img class="size-medium wp-image-1314" title="Screen shot 2010-04-07 at 4.21.04 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-4.21.04-PM-300x214.png" alt="Adding OpenFlow source code to the project." width="300" height="214" /></a><p class="wp-caption-text">Adding OpenFlow source code to the project.</p></div>
<p><strong>Add <code>QuartzCore</code> and <code>CoreGraphics</code> frameworks to your project.</strong></p>
<p><strong><br />
</strong></p>
<div id="attachment_1332" class="wp-caption alignnone" style="width: 499px"><img class="size-full wp-image-1332" title="Screen shot 2010-04-08 at 3.46.42 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-08-at-3.46.42-PM.png" alt="Adding frameworks" width="489" height="281" /><p class="wp-caption-text">Adding frameworks</p></div>
<p>Add both the frameworks form the &#8220;Existing Frameworks..&#8221; .</p>
<p><strong>Implementing the &#8220;CoverFlowViewController.h&#8221; class.</strong></p>
<p>-Import &#8220;AFOpenFlowView.h&#8221; into your CoverFlowVieController.h class.</p>
<p>-Then, you will have to implement two protocols <code>AFOpenFlowViewDelegate</code> and <code>AFOpenFlowViewDataSource.</code></p>
<p>-The only member of .h class would be a queue to hold all the images needed for the cover flow.</p>
<p>Once you are done with all 3 steps, your source code would be as shown below.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">//  CoverFlowViewController.h</span>
<span style="color: #11740a; font-style: italic;">//  CoverFlow</span>
<span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  Created by Avinash on 4/7/10.</span>
<span style="color: #11740a; font-style: italic;">//  Copyright Apple Inc 2010. All rights reserved.</span>
<span style="color: #11740a; font-style: italic;">//</span>
&nbsp;
<span style="color: #6e371a;">#import</span>
<span style="color: #6e371a;">#import &quot;AFOpenFlowView.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> CoverFlowViewController <span style="color: #002200;">:</span> UIViewController  <span style="color: #002200;">&#123;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Queue to hold the cover flow images</span>
&nbsp;
	<span style="color: #400080;">NSOperationQueue</span> <span style="color: #002200;">*</span>loadImagesOperationQueue;
&nbsp;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<p><strong>Implementing the &#8220;CoverFlowViewController.m&#8221; class</strong>.</p>
<p>Open the CoverFlowViewController.m class and you will see many methods already generated and commented out.</p>
<p>As we  want this effect to occur as soon as our view is loaded, we start writing our code under the method <strong>-(void)viewDidLoad{</strong></p>
<p><strong>} </strong></p>
<p>Just uncomment the method and start writing the code.</p>
<p>Lets see how we implement this class</p>
<p>-Load the images into the queue</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>viewDidLoad <span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>super viewDidLoad<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">// loading images into the queue</span>
&nbsp;
	loadImagesOperationQueue <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSOperationQueue</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>imageName;
	<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 <span style="color: #002200;">&amp;</span>lt; <span style="color: #2400d9;">10</span>; i<span style="color: #002200;">++</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
		imageName <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> alloc<span style="color: #002200;">&#93;</span> initWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;cover_%d.jpg&quot;</span>, i<span style="color: #002200;">&#93;</span>;
		<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#40;</span>AFOpenFlowView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>self.view setImage<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span>imageName<span style="color: #002200;">&#93;</span> forIndex<span style="color: #002200;">:</span>i<span style="color: #002200;">&#93;</span>;
		<span style="color: #002200;">&#91;</span>imageName release<span style="color: #002200;">&#93;</span>;
		NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%d is the index&quot;</span>,i<span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #002200;">&#125;</span>
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#40;</span>AFOpenFlowView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>self.view setNumberOfImages<span style="color: #002200;">:</span><span style="color: #2400d9;">10</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>-We implement two delegate protocols one to set the default image for the cover flow and the other to tell which image has bee selected.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">//delegate protocols</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// delegate protocol to tell which image is selected</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>openFlowView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>AFOpenFlowView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>openFlowView selectionDidChange<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>index<span style="color: #002200;">&#123;</span>
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%d is selected&quot;</span>,index<span style="color: #002200;">&#41;</span>;
&nbsp;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// setting the image 1 as the default pic</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>defaultImage<span style="color: #002200;">&#123;</span>
&nbsp;
	<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>UIImage imageNamed<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;cover_1.jpg&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
CoverFlow@end</pre></div></div>

<p>Once both your classes are implemented you need your Image library to display the images in the <strong>Cover Flow </strong>effect. Just drag and drop your set of images folder under the <strong>Resources</strong> tab of your project</p>
<div id="attachment_1338" class="wp-caption alignnone" style="width: 598px"><img class="size-full wp-image-1338" title="Screen shot 2010-04-08 at 5.06.13 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-08-at-5.06.13-PM.png" alt="Adding images library to the project" width="588" height="621" /><p class="wp-caption-text">Adding images library to the project</p></div>
<p>Once you have implemented both the classes and your images library is ready you will be just left out with final step, modifying the interface builder  i.e, the .xib file.</p>
<p>You will find this .xib file under the  <strong>Resources</strong> tab in the project. Double click this .xib file and it opens up the <strong>&#8220;interface builder&#8221;</strong>.</p>
<p><strong>Resources-iphone &#8211;&gt; CoverflowViewController.xib</strong></p>
<p>Once you open this file the Interface Builder would present you with  3 to 4 separate windows like <strong>Library, Identity Inspector, View, Reveal in document window.</strong></p>
<p>If they do not open up automatically, nothing to worry, you can open it up manually and you find all these windows in the <strong>Tools</strong> tab of the Interface Builder. Once you open up the <strong>CoverFlowViewController.xib</strong> window you will find attributes like <strong>Files owner, First Responder, Open Flow View.</strong></p>
<p>As you can see the type of this <strong>Open Flow View</strong> attribute will be set to <strong>UIView</strong>.</p>
<p>But as we are creating a <strong>Open Flow View </strong>instead of the regular<strong> UIView</strong> its identity should be changed to <strong>AFOpenFlowView</strong>.</p>
<p>To do this select the <strong>Open Flow View</strong> attribute in the <strong>.xib</strong> window and in the Identity Inspector window go to the tab <strong>&#8220;i&#8221;</strong> (identity) the right corner tab. Change the class <strong>UIView</strong> to <strong>AFOpenFlowView</strong> as shown below.</p>
<div id="attachment_1343" class="wp-caption alignnone" style="width: 670px"><img class="size-full wp-image-1343" title="Screen shot 2010-04-08 at 5.02.17 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-08-at-5.02.17-PM.png" alt="changing the View Identity" width="660" height="327" /><p class="wp-caption-text">changing the View Identity</p></div>
<p>Once you are done with this final step  the stage is set and you are ready to go. Save and Run this project in the iphone simulator and you must be able to see the<strong> Cover Flow effect</strong> as shown in the  screen shot below.</p>
<div id="attachment_1344" class="wp-caption aligncenter" style="width: 368px"><img class="size-full wp-image-1344" title="Screen shot 2010-04-08 at 5.44.01 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-08-at-5.44.01-PM.png" alt="Cover Flow Effect" width="358" height="692" /><p class="wp-caption-text">Cover Flow Effect</p></div>
<p>And there you go, you have just added the cool  Cover FLow Effect to your apps in minutes. But it took me much longer time to complete this post.</p>
<p>Hope you liked this post and feel free to add any comment or any suggestions.</p>
<p>Finally Subscribe US(Object Graph) on FaceBook and Twitter….</p>
<p><strong>Download the complete source code <a rel="attachment wp-att-1372" href="http://blog.objectgraph.com/index.php/2010/04/09/how-to-add-coverflow-effect-on-your-iphone-app-openflow/coverflow/">here</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/09/how-to-add-coverflow-effect-on-your-iphone-app-openflow/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Demo at Apple Store in Tokyo, Ginza</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/09/demo-at-apple-store-in-tokyo-ginza/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/09/demo-at-apple-store-in-tokyo-ginza/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 19:22:56 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1354</guid>
		<description><![CDATA[Japanese Pharmacopoeia is one of most important reference for Pharmacists and Medicine Doctors who work in Japan.
You are able to browse entire Pharmacopoeia document via lighting quick search engine.
Each tab represent specific purpose to get necessarily information as you need.
We would like to celebrate our second app, Japanese Pharmacopoeia,  with toyaku.com. While our first app, [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Japanese Pharmacopoeia is one of most important reference for Pharmacists and Medicine Doctors who work in Japan.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">You are able to browse entire Pharmacopoeia document via lighting quick search engine.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Each tab represent specific purpose to get necessarily information as you need.</div>
<p>We would like to celebrate our second app, <a href="http://itunes.apple.com/us/app/japanese-pharmacopoeia/id366032642?mt=8">Japanese Pharmacopoeia</a>,  with toyaku.com. While our first app, JP Medicine Description, is still in top 3 in the Medical category, this app is already ranked in the first page! Hiro who is our business partner will demonstrate those two apps and we will announce our new project in Apple Store in Tokyo today. For more detail, see <a href="http://www.toyaku.com/wp/?p=34">toyaku.com</a>:</p>
<p>[Japanese]</p>
<p>toyaku.com/薬剤師＋ObjectGraphコラボレーション企画第２段、<a href="http://itunes.apple.com/us/app/japanese-pharmacopoeia/id366032642?mt=8">日本薬局方</a>アプリが出ました。巨大な目次と索引からお探しのキーワードで高速検索が出来ます。医療・薬局・薬学部関係者におすすめです。公開から２ヶ月間トップ３を維持している<a href="http://kusuri.objectgraph.com/pmda/">添付文書Lite</a>と、薬局方アプリの公開を記念して銀座のアップルストアでデモを行います。詳しくは<a href="http://www.toyaku.com/wp/?p=34">toyaku.com</a>から。</p>
<p><a href="http://twitter.com/toyaku">twitterもやっている</a>ので是非フォローしてください！</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/toyaku_demo_apple_ginza.png"><img class="alignnone size-full wp-image-1356" title="toyaku_demo_apple_ginza" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/toyaku_demo_apple_ginza.png" alt="toyaku_demo_apple_ginza" width="455" height="399" /></a></p>
<p>Japanese Pharmacopoeia is one of most important reference for Pharmacists and Medicine Doctors who work in Japan. You are able to browse entire Pharmacopoeia document via lighting fast search engine with organized index menu. Each tab represent specific purpose to getinformation as you need.</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screenshot-2010.04.03-01.37.52.png"><img class="alignnone size-full wp-image-1355" title="Screenshot 2010.04.03 01.37.52" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screenshot-2010.04.03-01.37.52.png" alt="Screenshot 2010.04.03 01.37.52" width="320" height="480" /></a></p>
<p><a href="http://itunes.apple.com/us/app/japanese-pharmacopoeia/id366032642?mt=8">Download from here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/09/demo-at-apple-store-in-tokyo-ginza/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to use sqlite with UITableView in iPhone SDK</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/08/how-to-use-sqlite-with-uitableview-in-iphone-sdk/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/08/how-to-use-sqlite-with-uitableview-in-iphone-sdk/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 15:28:25 +0000</pubDate>
		<dc:creator>madhavi</dc:creator>
				<category><![CDATA[iphone development]]></category>
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1224</guid>
		<description><![CDATA[Hi All,
I have been creating an App using TableView with SQLite Manager&#8230;.As a Beginner Like many others I too visited many sites in search of understanding about tableviews and how to Integrate it with Database&#8230;.Here I am giving you all a detailed explanation of about TableViews and Database&#8230;.let us look at it&#8230;.
AIM OF THE Project: [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All,</p>
<p>I have been creating an <em><strong>App using TableView with SQLite Manager</strong></em>&#8230;.As a Beginner Like many others I too visited many sites in search of understanding about tableviews and how to Integrate it with Database&#8230;.Here I am giving you all a detailed explanation of about TableViews and Database&#8230;.let us look at it&#8230;.</p>
<p><em><strong>AIM OF THE Project:</strong></em> Here our Aim is Afterwhen launching into the Application you get list of Animals names Displayed and when you click on those animal names you get details of those animals in the next view.</p>
<p>So Initially for developing any project you must have:</p>
<ul>
<li>Database &#8212;- At first we must have our database ready in our Hand in order to make our lifes easy for using that in our Application.</li>
</ul>
<p><em>Now let us look at how to create Database using SQLite Manager&#8230;.</em></p>
<p><strong>Foreign key (Missing): </strong></p>
<p><strong>SQlite Manager:</strong> Is easy to use and create database but the only issue with it is THERE IS NO FOREIGN KEY OPTION&#8230;.Foreign keys Constraint is Missing in SQLite Manager.</p>
<p><strong>SQLite3</strong>: In the <em><strong>NEW VERSION of SQLite 3.6.19 and latest versions they have added the Foreign key concepts</strong></em> in them. But remember <em><strong>SQLITE3 is Different from SQLite Manager.</strong></em></p>
<p>Download SQLite Manager Add-on from FireFox and then Open Firefox &gt; Tools(Menu) &gt; SQLite Manager</p>
<p><img class="alignnone size-full wp-image-1255" title="Opening SQLite Manager from Firefox" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-06-at-11.40.55-PM.png" alt="Opening SQLite Manager from Firefox" width="273" height="251" /></p>
<p>Then <em><strong>Menu (In SQLite Manager)&gt; (click) NewDatabase &gt; SampleDB( Name of Database )</strong></em></p>
<p>Then <em><strong>select the database from the Directory (option on the top, Go to your Folder) &gt; SampleDB(select your Database)</strong></em></p>
<p>After that From the Menu on the Top in SQLite Manager you will find Different options for Creating Table, Editing Table etc&#8230;.so from that Click Create Table and then create tables after that Insert Data into those using &#8220;Insert Into&#8221; Statement into those tables&#8230;.</p>
<p><em><strong>Inserting data into those tables We Must go to EXECUTE SQL (Option in SQLite Manager ) &gt; Write Queary for Inserting data into the table &gt; RunSQL</strong></em></p>
<p>In this App for SampleDB, I wrote two Tables called:</p>
<p>1) Animals   2) Descsription &#8212;- <em><strong>here is how the database look like</strong></em>&#8230;.</p>
<p><img class="alignnone size-full wp-image-1256" title="Screen shot 2010-04-07 at 12.13.23 AM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-12.13.23-AM.png" alt="Screen shot 2010-04-07 at 12.13.23 AM" width="884" height="603" /><em>So We have completed Creating the DataBase for our Project,now we will be jumping into X-Code for Developing the App&#8230;.</em></p>
<p><em><strong>TableViews:</strong></em></p>
<p>In Table Views the most important thing we need to keep track is switching between the Views&#8230;.In my Project I have two views</p>
<p>1) For the First View I am inserting the data Manually</p>
<p>2) For the Second View I am Inserting data into tableview from the DataBase.</p>
<ul>
<li>so Initially Go to X-Code &gt; iPhoneOS &gt; Navigational-based Applications &gt; SampleTableViewApp (Name of The App) &gt; Choose</li>
</ul>
<p><img class="aligncenter size-full wp-image-1268" title="Screen shot 2010-04-07 at 3.06.08 AM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-3.06.08-AM.png" alt="Screen shot 2010-04-07 at 3.06.08 AM" width="813" height="676" />Now you see the Couple of Files Generated for us&#8230;.</p>
<p>Here you see 1) RootViewController.h 2) RootViewController.m 3) SampleTableViewAppDeligate.h 4) SampleTableViewAppDeligate.m 5) RootViewController.xib</p>
<p>These are the Files generated by X-Code and you can see those files in Classes Folder and Resources Folder.<strong> </strong></p>
<p><strong><em>Adding SQLite3 lib file:</em> </strong>Before starting the code we have to Add the SQLite3 Library into the Framework in the Application.</p>
<p>(right Click) Frameworks &gt; Add File &gt; Add Existing Frameworks &gt; LibSqlite3.0.dylib &gt; Add</p>
<p><em><strong>FMDB Wrapper:</strong></em> I am using FMDB Wrapper as an alternative for SQLite3 as it has easy way of  steps for accessing the DataBase. You can download this wrapper from Google. After downloading  JUST DRAG THE FMDB FOLDER INTO YOUR APPLICATION.</p>
<p><em><strong>Adding Database</strong></em>: Next Step is Add Database file to your Application</p>
<p>Go to your DataBase folder where you stored your SampleDB &gt; Drag it in to your App ( You can store it in anywhere )</p>
<p><em><strong>Coding: </strong></em>Let US Start coding the App&#8230;..so</p>
<p>The Next Step is We have Got the Files above and now Go to:</p>
<p><em> (right click on) SampleTableViewApp &gt; Add &gt; NewFile  &gt; UIViewController SubClass &gt; Next &gt; ElephantViewController.m (Name of File) &gt; Click Checkbox to add .h Files as shown in Figure.</em></p>
<p><em><img class="size-full wp-image-1296 alignleft" title="Screen shot 2010-04-07 at 2.24.32 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-2.24.32-PM1.png" alt="Screen shot 2010-04-07 at 2.24.32 PM" width="813" height="676" />In The Same way Add the LionViewController file&#8230;.<br />
</em></p>
<p><img class="aligncenter size-full wp-image-1297" title="Screen shot 2010-04-07 at 2.24.55 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-2.24.55-PM1.png" alt="Screen shot 2010-04-07 at 2.24.55 PM" width="813" height="676" /></p>
<p>Don&#8217;t get confused with the RootViewController,Deligate file, ElephantViewControllerfiles, LionViewController&#8230;. I will Explain you all those&#8230;.</p>
<p><em><strong>RootViewController</strong></em>: It is the First View of our App</p>
<p><em><strong>ElephantViewController</strong></em>, <em><strong>LionViewController</strong></em>: These are the Detailed View of the items which are displayed in the first view</p>
<p><em><strong>Deligete Files:</strong></em> This is the File which have all the details of deligate methods of TableView.</p>
<p>So now we have our RootView files and the DetailedView file of the Root View&#8230;.Now we will code our RootViewController File:</p>
<p><strong>Steps</strong>:</p>
<p>1)   RootViewController.h : Import &#8220;AnimalViewController&#8221; , then Create An Mutable Array for storing the Elements. Here is the code below:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &amp;lt;UIKit/UILit.h&amp;gt;</span>
<span style="color: #6e371a;">#import &quot;ElephantViewController.h&quot;</span>
<span style="color: #6e371a;">#import &quot;LionViewController.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> RootViewController <span style="color: #002200;">:</span> UITableViewController
<span style="color: #002200;">&#123;</span>
&nbsp;
<span style="color: #400080;">NSMutableArray</span> <span style="color: #002200;">*</span>mAnimal;
&nbsp;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>2) Go to RootViewController.m: then add the below code in View Did Load Function:</p>
<p>Here we are adding objects in the Array and Setting Title to the First View of The App&#8230;.Every thing is explained in the Code:</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>viewDidLoad
<span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>super viewDidLoad<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* Here we have allocated some memory to the Array object so we have to release it in Dealloc Function */</span>
&nbsp;
	mAnimal <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSMutableArray</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>; 
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* Next Step is Adding Objects to the Array*/</span>
&nbsp;
	<span style="color: #002200;">&#91;</span>mAnimal addObject<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Elephant&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>mAnimal addObject<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Lion&quot;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* Setting Title to the First View */</span>
&nbsp;
	<span style="color: #002200;">&#91;</span>self setTitle<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Quote Category&quot;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p><em><strong>Modifying TableView Deligate Methods:</strong></em></p>
<p>3) In this step we have to Modify the Deligate Methods of the Tableview according to our App Requirements:<br />
These can be found in the Bottom after the &#8221; #pragma mark Table view methods&#8221; Line. so Add the Below Code in those Methods:</p>
<p>Here the First Method we have to change is &#8220;NumberOfRowsInSection&#8221; by default it is &#8220;0&#8243; but We want our Rows to be Displayed as the number of elements in the Array so Update your Code as shown 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>NSInteger<span style="color: #002200;">&#41;</span>numberOfSectionsInTableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">1</span>;
<span style="color: #002200;">&#125;</span>
<span style="color: #11740a; font-style: italic;">// Customize the number of rows in the table view.</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView numberOfRowsInSection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>section <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>mAnimal count<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>4) In this step we can Configure the cells in the TableView by changing this Method &#8220;cellForRowAtIndexPath&#8221;<br />
we can set the Accessory type like&#8221; &gt; &#8221; as shown in the iPhone or iPod:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Customize the appearance of table view cells.</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UITableViewCell <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView cellForRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSIndexPath</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath <span style="color: #002200;">&#123;</span>
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* These are the Default Methods we don't need to configure them */</span>
&nbsp;
    <span style="color: #a61390;">static</span> <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>CellIdentifier <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cell&quot;</span>;
&nbsp;
    UITableViewCell <span style="color: #002200;">*</span>cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>tableView dequeueReusableCellWithIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>cell <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UITableViewCell alloc<span style="color: #002200;">&#93;</span> initWithStyle<span style="color: #002200;">:</span>UITableViewCellStyleDefault reuseIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
        <span style="color: #11740a; font-style: italic;">/* Configure the cell.
	   We have to start configuring cells from here
	 */</span>
&nbsp;
          <span style="color: #002200;">&#91;</span>cell setText<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>qCategoriesList objectAtIndex<span style="color: #002200;">:</span>indexPath.row<span style="color: #002200;">&#93;</span> retain<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* set the Accessory Type to our Cells like &quot;&amp;gt;&quot;*/</span>
&nbsp;
	 <span style="color: #002200;">&#91;</span>cell setAccessoryType<span style="color: #002200;">:</span>UITableViewCellAccessoryDetailDisclosureButton<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #a61390;">return</span> cell;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>5) Next Most Important step is &#8220;Pushing the First View to Second View&#8221; for this uncomment the &#8220;DidSelectRow&#8221; and do 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;">// Override to support row selection in the table view.</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>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView didSelectRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSIndexPath</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath <span style="color: #002200;">&#123;</span>
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* all the Methods are already given in this Function, We just need to change them according to our Requirements
	   If we Select Elephant then the View has to Push into another View giving details abuot the Elephant */</span>
&nbsp;
	<span style="color: #11740a; font-style: italic;">// Elephant View</span>
&nbsp;
	<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>mAnimal objectAtIndex<span style="color: #002200;">:</span>indexPath.row<span style="color: #002200;">&#93;</span> isEqual<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Elephat&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
	<span style="color: #002200;">&#123;</span>
		ElephantViewController <span style="color: #002200;">*</span>mEle <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>ElephantViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;ElephantViewController&quot;</span> bundle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #11740a; font-style: italic;">//Setting title to the TableView</span>
		<span style="color: #002200;">&#91;</span>mEle setTitle<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Elephant Details&quot;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #11740a; font-style: italic;">//Pushing the View from RootView to ElephantView</span>
		<span style="color: #002200;">&#91;</span>self.navigationController pushViewController<span style="color: #002200;">:</span>mEle animated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #11740a; font-style: italic;">//releasing the Allocated Object</span>
		<span style="color: #002200;">&#91;</span>mEle release<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
&nbsp;
	<span style="color: #11740a; font-style: italic;">// Lion View</span>
&nbsp;
	<span style="color: #a61390;">if</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>mAnimal objectAtIndex<span style="color: #002200;">:</span>indexPath.row<span style="color: #002200;">&#93;</span> isEqual<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Lion&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
	<span style="color: #002200;">&#123;</span>
		LionViewController <span style="color: #002200;">*</span>mLion <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>LionViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;LionViewController&quot;</span> bundle<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;">//Setting title to the TableView</span>
		<span style="color: #002200;">&#91;</span>mLion setTitle<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Lion Details&quot;</span><span style="color: #002200;">&#93;</span>;		
&nbsp;
		<span style="color: #11740a; font-style: italic;">//Pushing the View from RootView to ElephantView</span>
		<span style="color: #002200;">&#91;</span>self.navigationController pushViewController<span style="color: #002200;">:</span>mLion animated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;
&nbsp;
		<span style="color: #11740a; font-style: italic;">//releasing the Allocated Object</span>
		<span style="color: #002200;">&#91;</span>mLion release<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
<span style="color: #11740a; font-style: italic;">/* There ends the Pushing of our view now we have to code in our detailed views of Elephant and Lion in order to display data about them----we are displaying this data from the Database */</span>
&nbsp;
        <span style="color: #11740a; font-style: italic;">// Navigation logic may go here -- for example, create and push another view controller.</span>
	<span style="color: #11740a; font-style: italic;">// AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@&quot;AnotherView&quot; bundle:nil];</span>
	<span style="color: #11740a; font-style: italic;">// [self.navigationController pushViewController:anotherViewController animated:YES];</span>
	<span style="color: #11740a; font-style: italic;">// [anotherViewController release];</span>
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>Now we have to Code Our Detailed Views and Display data in them&#8230;We first Code our ElephantViewController</p>
<p>6) Now As we have created our &#8220;ElephatViewController&#8221; as a SubClass of UIViewController we need to Change that to UITableViewController Class<br />
i:e &#8220;ElephantTableViewController&#8221; as we want to display data in a TableView in ElephantViewController. Here is the Code of that:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">/* We have to import the FMDB Headers in our file as we have to use its queary methods for accessing the DB*/</span>
<span style="color: #6e371a;">#import</span>
<span style="color: #6e371a;">#import &quot;FMDatabase.h&quot;</span>
<span style="color: #6e371a;">#import &quot;FMResultSet.h&quot;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/*
It is Like this
@interface ElephantViewController : UIViewController
Now we are going to change it like this:
*/</span>
<span style="color: #a61390;">@interface</span> ElephantViewController <span style="color: #002200;">:</span> UITableViewController
<span style="color: #002200;">&#123;</span>
	<span style="color: #11740a; font-style: italic;">// We have to Create an Array in order to Hold the Data coming from the DataBase</span>
	<span style="color: #400080;">NSMutableArray</span> <span style="color: #002200;">*</span>aElephant;
	<span style="color: #11740a; font-style: italic;">//NSString object is used to hold the elements retrived from the database</span>
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>eleData;
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>nonatomic,retain<span style="color: #002200;">&#41;</span> <span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> eleData;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>7) Now as we did the .H file we have to implement the database connection and get the results form the DB<br />
here how it goes: now go to ElephantViewController.m File then do this code&#8230;.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;ElephantViewController.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@implementation</span> ElephantViewController
&nbsp;
<span style="color: #a61390;">@synthesize</span> eleData;
&nbsp;
<span style="color: #11740a; font-style: italic;">// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.</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>viewDidLoad
<span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>super viewDidLoad<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* Now here we have to write the code from the database to display the details */</span>
&nbsp;
	aElephant <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSMutableArray</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/*
	  Here we have to set the path
	  We are creating the path for the datbase file in order to access
	*/</span>
&nbsp;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>path  <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;SampleDB&quot;</span> ofType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;sqlite&quot;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* FMDatabase here is used to take the database path */</span>
&nbsp;
	FMDatabase <span style="color: #002200;">*</span>db  <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>FMDatabase alloc<span style="color: #002200;">&#93;</span> initWithPath<span style="color: #002200;">:</span>path<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* Here we are opening the datase in order to access it */</span>
&nbsp;
	<span style="color: #002200;">&#91;</span>db open<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/*
	 Then the next step here is taking the datbase result using the sqlqueary and then carrying that result into the resultset object
	 Resultset for Elephant: select * from Description where a_id=1; here description is the table, a_id is the id of Elephant it is
	 the primary key in animals table
	 */</span>
&nbsp;
	FMResultSet <span style="color: #002200;">*</span>fResult<span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>db executeQuery<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;SELECT * FROM description WHERE a_id=1&quot;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">/* Now we have to take these results in to a loop and then repeteadly loop it in order to get all the data in a   our Array Object */</span>
&nbsp;
	<span style="color: #a61390;">while</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>fResult next<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
	<span style="color: #002200;">&#123;</span>
		<span style="color: #11740a; font-style: italic;">/* taking results from database to a string &quot;eleData&quot; */</span>
		eleData <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>fResult stringForColumn<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;desc&quot;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #11740a; font-style: italic;">/* adding data from the string object to Array */</span>
		<span style="color: #002200;">&#91;</span>aElephant addObject<span style="color: #002200;">:</span>eleData<span style="color: #002200;">&#93;</span>;
		<span style="color: #11740a; font-style: italic;">/* Checking weather data has come or not */</span>
		NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;The data is %@=&quot;</span>,eleData<span style="color: #002200;">&#41;</span>;
	<span style="color: #002200;">&#125;</span>
	<span style="color: #11740a; font-style: italic;">/* Closing the Database */</span>
	<span style="color: #002200;">&#91;</span>db close<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>And now we got our data form the Database and stored it in the array Element</p>
<p> <img src='http://blog.objectgraph.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> In this Step as we got our data we have to now display that data in the table view of ElephantViewController.<br />
For that we need deligate methods of TableView&#8230;.Just Go to UITableView and copy the methods from there under the&#8221; #pragma mark Table view methods&#8221;&#8230;.</p>
<p>So now we only copy the required methods of Deligate&#8230;.methods with code are shown below, we don&#8217;t need to copy the &#8220;DidSelectRow&#8221;<br />
as we are not pushing this view to another view&#8230;we are just displaying the data here&#8230;. copy deligate methods above the dealloc():</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">/* UITABLEVIEW Deligate Methods */</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>numberOfSectionsInTableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">1</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Customize the number of rows in the table view.</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView numberOfRowsInSection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>section <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>aElephant count<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Customize the appearance of table view cells.</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UITableViewCell <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView cellForRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSIndexPath</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath <span style="color: #002200;">&#123;</span>
&nbsp;
    <span style="color: #a61390;">static</span> <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>CellIdentifier <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cell&quot;</span>;
&nbsp;
    UITableViewCell <span style="color: #002200;">*</span>cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>tableView dequeueReusableCellWithIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>cell <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UITableViewCell alloc<span style="color: #002200;">&#93;</span> initWithStyle<span style="color: #002200;">:</span>UITableViewCellStyleDefault reuseIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
         <span style="color: #11740a; font-style: italic;">// Configure the cell.</span>
        <span style="color: #11740a; font-style: italic;">//We are configuring my cells in table view</span>
&nbsp;
        <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>eData <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>aElephant objectAtIndex<span style="color: #002200;">:</span>indexPath.row<span style="color: #002200;">&#93;</span>;
	cell.textLabel.text  <span style="color: #002200;">=</span> eData;
&nbsp;
    <span style="color: #a61390;">return</span> cell;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>So Finally we did the Code part now we have to do the Interface builder for the ElephantViewController&#8230;.<br />
Remember in the above RootViewController we did not do any interface builder why because by default the TableView is added to it&#8230;.as initially we selected<br />
&#8220;Navigation based Application&#8221;&#8230;.</p>
<p>For adding the TableView in the ElephantViewController (click)ElephantViewController.xib &gt; then drop TableView on to the View Window.<br />
<em><strong>Important Info:</strong></em><br />
In the Connection we have to connect the datasource and deligate to the FilesOwner in the Interface Builder.</p>
<p>9) We have completed the Detailed View of ElephantViewController now we have to do the LionViewController:<br />
Repeat the same code for LionView Controller after doing that Save the files and Interface Builder&#8230;.</p>
<p>X-Code &gt; Build &gt; Go</p>
<p>This is the Final Result of our Application:</p>
<p><img class="aligncenter size-full wp-image-1289" title="RootViewController" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-2.13.03-PM.png" alt="RootViewController" width="414" height="770" /> RootViewController View</p>
<p><img class="aligncenter size-full wp-image-1290" title="ElephantViewController(Detailed View)" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-2.13.12-PM.png" alt="ElephantViewController(Detailed View)" width="414" height="770" /> Detailed View of ElephantViewController</p>
<p><img class="aligncenter size-full wp-image-1291" title="Detailed LionViewController" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Screen-shot-2010-04-07-at-2.13.20-PM.png" alt="Detailed LionViewController" width="414" height="770" /> Detailed View of LionViewController</p>
<p>And So Thus our Project gets Succeeded&#8230;.Hope this article helps you&#8230;.</p>
<p>And do comment on this post if you liked it&#8230;.Finally Subscribe US(Object Graph) on FaceBook and Twitter&#8230;.</p>
<p><em><strong>Project Download:</strong></em></p>
<p><em>You can Download Project by<strong> <span style="color: #0000ff;"><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/SampleTableView.zip">clicking  here</a></span></strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/08/how-to-use-sqlite-with-uitableview-in-iphone-sdk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Download an Image and Save it as PNG or JPEG in iPhone SDK</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/05/download-an-image-and-save-it-as-png-or-jpeg-in-iphone-sdk/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/05/download-an-image-and-save-it-as-png-or-jpeg-in-iphone-sdk/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 04:16:28 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[NSData]]></category>
		<category><![CDATA[NSDocumentDirectory]]></category>
		<category><![CDATA[PNG]]></category>
		<category><![CDATA[save]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIImageJPEGRepresentation]]></category>
		<category><![CDATA[UIImagePNGRepresentation]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1246</guid>
		<description><![CDATA[Here is a quick example to save an image as JPEG or PNG. In this tutorial, I&#8217;m getting the image from the Internet then I&#8217;m saving it as JPEG and PNG.
Key points:

NSData to retrieve the image from the URL
NSDocumentDirectory to find Document folder&#8217;s Path
UIImagePNGRepresentation to save it as PNG
UIImageJPEGRepresentation to save it as JPEG


	NSLog&#40;@&#34;Downloading...&#34;&#41;;
	// Get [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick example to save an image as JPEG or PNG. In this tutorial, I&#8217;m getting the image from the Internet then I&#8217;m saving it as JPEG and PNG.</p>
<p>Key points:</p>
<ul>
<li><strong>NSData</strong> to retrieve the image from the URL</li>
<li><strong>NSDocumentDirectory</strong> to find Document folder&#8217;s Path</li>
<li><strong>UIImagePNGRepresentation</strong> to save it as PNG</li>
<li><strong>UIImageJPEGRepresentation</strong> to save it as JPEG</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Downloading...&quot;</span><span style="color: #002200;">&#41;</span>;
	<span style="color: #11740a; font-style: italic;">// Get an image from the URL below</span>
	UIImage <span style="color: #002200;">*</span>image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImage alloc<span style="color: #002200;">&#93;</span> initWithData<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSData</span> dataWithContentsOfURL<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://www.objectgraph.com/images/og_logo.png&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%f,%f&quot;</span>,image.size.width,image.size.height<span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">// Let's save the file into Document folder.</span>
	<span style="color: #11740a; font-style: italic;">// You can also change this to your desktop for testing. (e.g. /Users/kiichi/Desktop/)</span>
	<span style="color: #11740a; font-style: italic;">// NSString *deskTopDir = @&quot;/Users/kiichi/Desktop&quot;;</span>
&nbsp;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>docDir <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>NSSearchPathForDirectoriesInDomains<span style="color: #002200;">&#40;</span>NSDocumentDirectory, NSUserDomainMask, <span style="color: #a61390;">YES</span><span style="color: #002200;">&#41;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #11740a; font-style: italic;">// If you go to the folder below, you will find those pictures</span>
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@&quot;</span>,docDir<span style="color: #002200;">&#41;</span>;
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;saving png&quot;</span><span style="color: #002200;">&#41;</span>;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>pngFilePath <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@/test.png&quot;</span>,docDir<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSData</span> <span style="color: #002200;">*</span>data1 <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSData</span> dataWithData<span style="color: #002200;">:</span>UIImagePNGRepresentation<span style="color: #002200;">&#40;</span>image<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>data1 writeToFile<span style="color: #002200;">:</span>pngFilePath atomically<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;saving jpeg&quot;</span><span style="color: #002200;">&#41;</span>;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>jpegFilePath <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@/test.jpeg&quot;</span>,docDir<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSData</span> <span style="color: #002200;">*</span>data2 <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSData</span> dataWithData<span style="color: #002200;">:</span>UIImageJPEGRepresentation<span style="color: #002200;">&#40;</span>image, 1.0f<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;<span style="color: #11740a; font-style: italic;">//1.0f = 100% quality</span>
	<span style="color: #002200;">&#91;</span>data2 writeToFile<span style="color: #002200;">:</span>jpegFilePath atomically<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;
&nbsp;
	NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;saving image done&quot;</span><span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #002200;">&#91;</span>image release<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>Download Sample XCode Project from <a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/ImageSaveTest.zip">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/05/download-an-image-and-save-it-as-png-or-jpeg-in-iphone-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Easter Day! Easter Egg Photo App Released</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/04/happy-easter-day-easter-egg-photo-app-released/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/04/happy-easter-day-easter-egg-photo-app-released/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 12:50:59 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1239</guid>
		<description><![CDATA[

*** LIMITED TIME FREE DOWNLOAD!!! ***
Add Easter Egg and bunny on your photo! Send your work to your friends. It will be a great greeting messages.
There are 17 images of Eggs and Bunnies. Bonus Images: we added 10 more frames.
[How to use]
1. Select or take a photo
2. Drag and drop one item from the top
3. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://j.mp/cc5cjA"></a><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/ss5.png"><img class="alignnone size-full wp-image-1243" title="ss5" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/ss5.png" alt="ss5" width="320" height="480" /></a></p>
<p><a href="http://j.mp/cc5cjA"><img class="alignnone size-full wp-image-159" title="App Store Download" src="http://blog.objectgraph.com/wp-content/uploads/2008/10/appstore.png" alt="App Store Download" width="190" height="62" /></a></p>
<p>*** LIMITED TIME FREE DOWNLOAD!!! ***</p>
<p>Add Easter Egg and bunny on your photo! Send your work to your friends. It will be a great greeting messages.</p>
<p>There are 17 images of Eggs and Bunnies. Bonus Images: we added 10 more frames.</p>
<p>[How to use]<br />
1. Select or take a photo<br />
2. Drag and drop one item from the top<br />
3. You can rotate or scale the item.<br />
4. Save and send it to your friends!</p>
<p>[Features]<br />
-Use a Photo from your album<br />
-Take a picture<br />
-Transparency Adjustment</p>
<p>You can share your &#8220;work&#8221; via<br />
-Facebook<br />
-Twitter<br />
-Email<br />
-Save to your album</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/04/happy-easter-day-easter-egg-photo-app-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad Experience with HD Apps from ObjectGraph</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/04/ipad-experience-with-hd-apps-from-objectgraph/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/04/ipad-experience-with-hd-apps-from-objectgraph/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 12:38:35 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[iPad]]></category>
		<category><![CDATA[iSeismometer]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[isamegame]]></category>
		<category><![CDATA[mailboxfind]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[maracas]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[yummy]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1228</guid>
		<description><![CDATA[Hello,
We are in Day 1 of iPad&#8217;s App store. Check out our apps on iPad!



Some existing apps work very well&#8230;

iPad&#8217;s Safari looks good.
Click here to see more!
]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>We are in Day 1 of iPad&#8217;s App store. Check out our apps on iPad!</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/Mobile-Photo-Apr-3-2010-9-06-22-PM2.jpg"><img class="alignnone size-medium wp-image-1235" title="Mobile Photo Apr 3,  2010 9 06 22 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Mobile-Photo-Apr-3-2010-9-06-22-PM2-225x300.jpg" alt="Mobile Photo Apr 3, 2010 9 06 22 PM" width="225" height="300" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/Mobile-Photo-Apr-3-2010-9-05-48-PM.jpg"><img class="alignnone size-medium wp-image-1231" title="Mobile Photo Apr 3, 2010 9 05 48 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Mobile-Photo-Apr-3-2010-9-05-48-PM-300x225.jpg" alt="Mobile Photo Apr 3, 2010 9 05 48 PM" width="300" height="225" /></a></p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/Mobile-Photo-Apr-3-2010-9-06-47-PM1.jpg"><img class="alignnone size-medium wp-image-1236" title="Mobile Photo Apr 3, 2010 9 06 47 PM" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/Mobile-Photo-Apr-3-2010-9-06-47-PM1-300x225.jpg" alt="Mobile Photo Apr 3, 2010 9 06 47 PM" width="300" height="225" /></a></p>
<p>Some existing apps work very well&#8230;</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/ipad1.jpg"><img class="alignnone size-full wp-image-1237" title="ipad" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/ipad1.jpg" alt="ipad" width="294" height="390" /></a></p>
<p>iPad&#8217;s Safari looks good.</p>
<p>Click <a href="http://j.mp/dkzPkH">here</a> to see more!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/04/ipad-experience-with-hd-apps-from-objectgraph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Estimating the economic damages from April 1st activities in mobile markets and Computational Economics Theory</title>
		<link>http://blog.objectgraph.com/index.php/2010/04/01/estimating-the-economic-damages-from-april-1st-activities-in-mobile-markets/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/04/01/estimating-the-economic-damages-from-april-1st-activities-in-mobile-markets/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 14:57:36 +0000</pubDate>
		<dc:creator>kiichi</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[joke]]></category>
		<category><![CDATA[this is April 1st Joke Please do not take seriously]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1178</guid>
		<description><![CDATA[ObjectGraph Research Lab &#38; USODESU (The United Science Organization and Domestic Environment Science Union)   Group Announce Research Partnership
Since ObjectGraph Research Lab was funded for $1 million in the beginning of this year, we explored various fields in computational theory, such as distributed computing, brain science, and computational physics.
Today, we are glad to announce that we [...]]]></description>
			<content:encoded><![CDATA[<h2>ObjectGraph Research Lab &amp; USODESU (The United Science Organization and Domestic Environment Science Union)   Group Announce Research Partnership</h2>
<p>Since ObjectGraph Research Lab was funded for $1 million in the beginning of this year, we explored various fields in computational theory, such as distributed computing, brain science, and computational physics.</p>
<p>Today, we are glad to announce that we start collaborating with a non-profit reseach organization, <a href="http://translate.google.co.jp/#ja|en|%E5%98%98%E3%81%A7%E3%81%99%0A">USODESU</a>(The United Science Organization and Domestic Environment Science Union). <a href="http://www.twitter.com/objectgraph">Dr. Sríníváská Gávínskí, Ph.D </a>who has been researched <a href="http://www.google.com/search?hl=en&amp;source=hp&amp;q=fart+piano+objectgraph&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=">Digestive System of Mobile Computation</a> for 25 years and Kíchíego Tákévuruchí who is our first research fellow at ObjectGraph Research Lab &#8482; collaborated to publish an article, <strong><em>&#8220;Estimating the economic damages from April 1st Activities in mobile markets and Computational Economics Theory&#8221;</em></strong>. This scholar type of article was approved and printed by <em>Journal of Environmental Virtual Economics.</em></p>
<p>Our main focus is to research overwhelmed network bandwidth of major mobile career by false news on April 1st and creating pseudo mobile software. From the conclusion, we estimated that false news on April 1st and useless software to be deleted in 30 seconds on iPhone costs about <strong><span style="text-decoration: underline;">$2.4 billion</span></strong> to cover additional network bandwidth, disk spaces, and CPU resource of wireless companies and contents providers (e.g. AT&amp;T and Apple). In addition, extra 10.8 Tera Flops of CPU cycle is consumed by playing <a href="http://www.youtube.com/watch?v=MBkuzUgVa-E">PPHBN</a> (Post Process Human Body Noise) and <a href="http://www.youtube.com/watch?v=_OryFzMdaCU">RVIIMTC</a> (Rotating Virtual Interface and Inefficient Method to Call) on mobile devices. The Analysis sction shows good agreement between Gigawatt Joule / Hour by Mobile CPU and Global Annual Mean Temperature Changes / Hour which indicates another evidence of global warming. However, PPHBN software has been know as eco-friendly product because it releases PPHBN sounds into the environment without any greenhouse gas agent (e.g. methane).</p>
<p><a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/ecnonmic_effect_fig.png"><img class="alignnone size-full wp-image-1185" style="border: 0px initial initial;" title="ecnonmic_effect_fig" src="http://blog.objectgraph.com/wp-content/uploads/2010/04/ecnonmic_effect_fig.png" alt="ecnonmic_effect_fig" width="291" height="265" /></a></p>
<p>Here is the Abstract:</p>
<p>Estimating the economic damages from April 1st Activities in mobile markets and Computational Economics Theory</p>
<h4><span style="font-weight: normal;">Gávínskí, Sríníváská and M. Tákévuruchí, Kíchíego</span></h4>
<h4><span style="font-weight: normal;">A Department of Applied Economics, Faculty of Computer Science, University of  Pseudo, 3820 Moscow, Russia</p>
<p>Institute of ObjectGraph LLC, Research Fellow, New York, USA</p>
<p>Received 1 April 2010;  revised 1 April 2010;  revised 1 April 2010.  Available online 1 April 2099.</p>
<p></span></h4>
<h4>Abstract</h4>
<p>In the last few years, smartphones and similar handheld devices have evolved into fully integrated technology platforms which are used frequently and distributed widely. The useless apps (UA) may be considered as one of the worst in 2010 because of the amount of UA (102,320 apps at the moment) and the network bandwidth affected:  The Internet and congestion control, while private in theory, have not until recently been considered essential. in our research, we disprove the emulation of thin clients, which embodies the confirmed principles of programming languages. In order to accomplish this goal, we argue that the seminal mobile algorithm for the emulation of gigabit switches by O. Zheng is maximally efficient.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">M. Dolores Garza-Gil, a, , Albino Prada-Blancoa and M. Xosé Vázquez-Rodrígueza</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">aDepartment of Applied Economics, Faculty of Economics, University of Vigo Lagoas-Marcosende, 36310 Vigo, Spain</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">Received 10 June 2005;  revised 14 September 2005;  revised 18 September 2005.  Available online 19 October 2005.</div>
<h4>Download</h4>
<p>Click <a href="http://blog.objectgraph.com/wp-content/uploads/2010/04/Srnivaska_Gavinski_Kichiego_Takevuruchi_April_1_2010.pdf">here</a> to download this paper.</p>
<h4>Note</h4>
<p><span style="color: #ff0000;">This is April 1st Joke.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/04/01/estimating-the-economic-damages-from-april-1st-activities-in-mobile-markets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create a Twitter Client on Windows Phone 7</title>
		<link>http://blog.objectgraph.com/index.php/2010/03/26/how-to-create-a-twitter-client-on-windows-phone-7/</link>
		<comments>http://blog.objectgraph.com/index.php/2010/03/26/how-to-create-a-twitter-client-on-windows-phone-7/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 21:07:07 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[visual studio 2010]]></category>

		<guid isPermaLink="false">http://blog.objectgraph.com/?p=1131</guid>
		<description><![CDATA[It was only days ago when I installed the Windows Phone Developer Tools CTP and began playing around with the SDK.  After reading a tutorial on ScottGu&#8217;s blog, I finally decided to try and build a small Twitter client with simple functionality like retrieving a list of feeds and updating your status.
I started by creating [...]]]></description>
			<content:encoded><![CDATA[<p>It was only days ago when I installed the Windows Phone Developer Tools CTP and began playing around with the SDK.  After reading a tutorial on ScottGu&#8217;s blog, I finally decided to try and build a small Twitter client with simple functionality like retrieving a list of feeds and updating your status.</p>
<p>I started by creating a Windows Phone List Application since I wanted the user to be able to navigate back and forth between the user_timeline screen and the update screen.</p>
<p>The first thing I noticed was that the ListBox was pre-filled with more items than I needed.  You can make changes to them by going into the ViewModels folder and editing MainViewModel.cs.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> MainViewModel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    Items <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ObservableCollection<span style="color: #008000;">&lt;</span>ItemViewModel<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #008000;">new</span> ItemViewModel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> LineOne <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;user_timeline&quot;</span>, LineTwo <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;20 most recent statuses posted&quot;</span>, <span style="color: #000000;">&#125;</span>,
        <span style="color: #008000;">new</span> ItemViewModel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> LineOne <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;update&quot;</span>, LineTwo <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Updates user's status&quot;</span>, <span style="color: #000000;">&#125;</span>,
    <span style="color: #000000;">&#125;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Since I wanted to keep this tutorial very simple, I added two items:</p>
<ul>
<li>getting the feed for a user&#8217;s timeline</li>
<li>updating your own status</li>
</ul>
<p>Next, I created two Windows Phone Portrait Pages:  UserTimeline.xaml and Update.xaml.  I needed to make sure that I would be navigating to the correct page when I click on an item in the ListBox, so I added the following code to MainPage.xaml.cs to check the index of the item selected.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> PageTransitionList_Completed<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">// Set datacontext of details page to selected listbox item</span>
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ListBoxOne.<span style="color: #0000FF;">SelectedIndex</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        NavigationService.<span style="color: #0000FF;">Navigate</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> Uri<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;/UserTimeline.xaml&quot;</span>, UriKind.<span style="color: #0000FF;">Relative</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0600FF;">else</span> <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ListBoxOne.<span style="color: #0000FF;">SelectedIndex</span> <span style="color: #008000;">==</span> <span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        NavigationService.<span style="color: #0000FF;">Navigate</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> Uri<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;/Update.xaml&quot;</span>, UriKind.<span style="color: #0000FF;">Relative</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0600FF;">else</span> <span style="color: #000000;">&#123;</span>
        <span style="color: #008080; font-style: italic;">// error handling here</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    FrameworkElement root <span style="color: #008000;">=</span> Application.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">RootVisual</span> <span style="color: #0600FF;">as</span> FrameworkElement<span style="color: #008000;">;</span>
    root.<span style="color: #0000FF;">DataContext</span> <span style="color: #008000;">=</span> _selectedItem<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>I would then get a preview that looks something like this:</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/03/001.png" alt="001" title="001" width="396" height="761" class="alignnone size-full wp-image-1164" /></p>
<p>Setting up the navigation seemed easy enough.  Let&#8217;s move on to implementing the feed retrieval.  I started by adding a TextBox, a Button and a ListBox to UserTimeline.xaml.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>TextBox Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;31&quot;</span> HorizontalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Left&quot;</span> Margin<span style="color: #008000;">=</span><span style="color: #666666;">&quot;6,67,0,0&quot;</span> Name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;tbUsername&quot;</span> Text<span style="color: #008000;">=</span><span style="color: #666666;">&quot;&quot;</span> VerticalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Top&quot;</span> Width<span style="color: #008000;">=</span><span style="color: #666666;">&quot;297&quot;</span> <span style="color: #008000;">/&gt;</span>
<span style="color: #008000;">&lt;</span>Button Content<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Get Feed&quot;</span> Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;70&quot;</span> HorizontalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Left&quot;</span> Margin<span style="color: #008000;">=</span><span style="color: #666666;">&quot;314,67,0,0&quot;</span> Name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;btnSubmit&quot;</span> VerticalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Top&quot;</span> Width<span style="color: #008000;">=</span><span style="color: #666666;">&quot;160&quot;</span> Click<span style="color: #008000;">=</span><span style="color: #666666;">&quot;btnSubmit_Click&quot;</span> <span style="color: #008000;">/&gt;</span>
<span style="color: #008000;">&lt;</span>ListBox Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;483&quot;</span> HorizontalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Left&quot;</span> Margin<span style="color: #008000;">=</span><span style="color: #666666;">&quot;0,169,0,0&quot;</span> Name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;lbContent&quot;</span> VerticalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Top&quot;</span> Width<span style="color: #008000;">=</span><span style="color: #666666;">&quot;480&quot;</span><span style="color: #008000;">&gt;&lt;/</span>ListBox<span style="color: #008000;">&gt;</span></pre></div></div>

<p>Double-click on the button to automatically create the event handler for the button&#8217;s click event.  Here, we will create an instance of the WebClient class and download a Twitter feed asynchronously.  This is very simple since Twitter provides the user_timeline method for you in their REST API.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> btnSubmit_Click<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, RoutedEventArgs e<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    textBlockPageTitle.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;loading feed...&quot;</span><span style="color: #008000;">;</span>
    WebClient twitter <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> WebClient<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    twitter.<span style="color: #0000FF;">DownloadStringCompleted</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> DownloadStringCompletedEventHandler<span style="color: #000000;">&#40;</span>twitter_DownloadStringCompleted<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    twitter.<span style="color: #0000FF;">DownloadStringAsync</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> Uri<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=&quot;</span> <span style="color: #008000;">+</span> tbUsername.<span style="color: #0000FF;">Text</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Remember to add the DownloadStringCompleted event handler before you make a call to DownloadStringAsync.  The DownloadStringCompletedEventHandler will fire after the feed is returned.  From within this event handler, we can parse the XML reponse by using LINQ to XML.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">void</span> twitter_DownloadStringCompleted<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, DownloadStringCompletedEventArgs e<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">try</span> <span style="color: #000000;">&#123;</span>
        XElement element <span style="color: #008000;">=</span> XElement.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>e.<span style="color: #0000FF;">Result</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        lbContent.<span style="color: #0000FF;">ItemsSource</span> <span style="color: #008000;">=</span> from tweet <span style="color: #0600FF;">in</span> element.<span style="color: #0000FF;">Descendants</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;status&quot;</span><span style="color: #000000;">&#41;</span>
                                select <span style="color: #008000;">new</span> Tweet <span style="color: #000000;">&#123;</span>
                                    UserName <span style="color: #008000;">=</span> tweet.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;user&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;screen_name&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Value</span>,
                                    Message <span style="color: #008000;">=</span> tweet.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;text&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Value</span>,
                                    ImageSource <span style="color: #008000;">=</span> tweet.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;user&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;profile_image_url&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Value</span>,
                                    TweetSource <span style="color: #008000;">=</span> FormatTimestamp<span style="color: #000000;">&#40;</span>tweet.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;source&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Value</span>, tweet.<span style="color: #0000FF;">Element</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;created_at&quot;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Value</span><span style="color: #000000;">&#41;</span>
                                <span style="color: #000000;">&#125;</span><span style="color: #008000;">;</span>
        textBlockPageTitle.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> tbUsername.<span style="color: #0000FF;">Text</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>Exception ex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        textBlockPageTitle.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;ERROR: &quot;</span> <span style="color: #008000;">+</span> ex.<span style="color: #0000FF;">Message</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>If you notice from the above code, I wrote a helper class called Tweet which contains 4 properties:  UserName, Message, ImageSource, and TweetSource.  These are the items that I would want to display for each Twitter update in my ListBox.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> Tweet <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> UserName <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> Message <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> ImageSource <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> TweetSource <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Since the &#8220;source&#8221; element returned by the XML response may contain URL encoded characters and HTML tags, I used the following method to properly decode this string and strip all HTML tags using a regular expression.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> StripHtml<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> val<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> Regex.<span style="color: #0000FF;">Replace</span><span style="color: #000000;">&#40;</span>HttpUtility.<span style="color: #0000FF;">HtmlDecode</span><span style="color: #000000;">&#40;</span>val<span style="color: #000000;">&#41;</span>, <span style="color: #666666;">@&quot;&lt;[^&gt;]*&gt;&quot;</span>, <span style="color: #666666;">&quot;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The format of the date in the &#8220;created_at&#8221; element returned by the XML response would have to be parsed correctly as well.  Below is an example of how I parsed the string into a DateTime object with a specified format.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> DateFormat<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> val<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #FF0000;">string</span> format <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;ddd MMM dd HH:mm:ss zzzz yyyy&quot;</span><span style="color: #008000;">;</span>
    DateTime dt <span style="color: #008000;">=</span> DateTime.<span style="color: #0000FF;">ParseExact</span><span style="color: #000000;">&#40;</span>val, format, CultureInfo.<span style="color: #0000FF;">InvariantCulture</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF;">return</span> dt.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;h:mm tt MMM d&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Finally, this method below formats the timestamp into something that&#8217;s more similar to what you see on Twitter&#8217;s site (e.g. 11:05 AM Mar 24th via API)</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> FormatTimestamp<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> imageSource, <span style="color: #FF0000;">string</span> date<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> DateFormat<span style="color: #000000;">&#40;</span>date<span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; via &quot;</span> <span style="color: #008000;">+</span> StripHtml<span style="color: #000000;">&#40;</span>imageSource<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Going back to UserTimeline.xaml, I added a ListBox template that formats all the data from the XML reponse that&#8217;s similar to Twitter&#8217;s site.  Since we set the DataSource of our ListBox to point to an instance of our Tweet class, we can bind these values by using meta tags like: {Binding UserName}, {Binding Message}, etc.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>ListBox Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;483&quot;</span> HorizontalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Left&quot;</span> Margin<span style="color: #008000;">=</span><span style="color: #666666;">&quot;0,169,0,0&quot;</span> Name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;lbContent&quot;</span> VerticalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Top&quot;</span> Width<span style="color: #008000;">=</span><span style="color: #666666;">&quot;480&quot;</span><span style="color: #008000;">&gt;</span>
    <span style="color: #008000;">&lt;</span>ListBox.<span style="color: #0000FF;">ItemTemplate</span><span style="color: #008000;">&gt;</span>
        <span style="color: #008000;">&lt;</span>DataTemplate<span style="color: #008000;">&gt;</span>
            <span style="color: #008000;">&lt;</span>StackPanel Orientation<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Horizontal&quot;</span> Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;132&quot;</span><span style="color: #008000;">&gt;</span>
                <span style="color: #008000;">&lt;</span>Image Source<span style="color: #008000;">=</span><span style="color: #666666;">&quot;{Binding ImageSource}&quot;</span> Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;73&quot;</span> Width<span style="color: #008000;">=</span><span style="color: #666666;">&quot;73&quot;</span> VerticalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Top&quot;</span> Margin<span style="color: #008000;">=</span><span style="color: #666666;">&quot;0,10,8,0&quot;</span><span style="color: #008000;">/&gt;</span>
                <span style="color: #008000;">&lt;</span>StackPanel Width<span style="color: #008000;">=</span><span style="color: #666666;">&quot;370&quot;</span><span style="color: #008000;">&gt;</span>
                    <span style="color: #008000;">&lt;</span>TextBlock Text<span style="color: #008000;">=</span><span style="color: #666666;">&quot;{Binding UserName}&quot;</span> Foreground<span style="color: #008000;">=</span><span style="color: #666666;">&quot;#FF2276BB&quot;</span> FontSize<span style="color: #008000;">=</span><span style="color: #666666;">&quot;28&quot;</span> <span style="color: #008000;">/&gt;</span>
                    <span style="color: #008000;">&lt;</span>TextBlock Text<span style="color: #008000;">=</span><span style="color: #666666;">&quot;{Binding Message}&quot;</span> TextWrapping<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Wrap&quot;</span> FontSize<span style="color: #008000;">=</span><span style="color: #666666;">&quot;24&quot;</span> <span style="color: #008000;">/&gt;</span>
                    <span style="color: #008000;">&lt;</span>HyperlinkButton Content<span style="color: #008000;">=</span><span style="color: #666666;">&quot;{Binding TweetSource}&quot;</span> Height<span style="color: #008000;">=</span><span style="color: #666666;">&quot;30&quot;</span> HorizontalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Left&quot;</span> VerticalAlignment<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Top&quot;</span> FontSize<span style="color: #008000;">=</span><span style="color: #666666;">&quot;18&quot;</span> Foreground<span style="color: #008000;">=</span><span style="color: #666666;">&quot;#FF999999&quot;</span> <span style="color: #008000;">/&gt;</span>
                <span style="color: #008000;">&lt;/</span>StackPanel<span style="color: #008000;">&gt;</span>
            <span style="color: #008000;">&lt;/</span>StackPanel<span style="color: #008000;">&gt;</span>
        <span style="color: #008000;">&lt;/</span>DataTemplate<span style="color: #008000;">&gt;</span>
    <span style="color: #008000;">&lt;/</span>ListBox.<span style="color: #0000FF;">ItemTemplate</span><span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&lt;/</span>ListBox<span style="color: #008000;">&gt;</span></pre></div></div>

<p>That&#8217;s all there is too it.  Once you compile and run the application in the emulator, you should get something that looks like this:</p>
<p><img src="http://blog.objectgraph.com/wp-content/uploads/2010/03/002.png" alt="002" title="002" width="396" height="761" class="alignnone size-full wp-image-1170" /></p>
<p>(update status blog goes here)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.objectgraph.com/index.php/2010/03/26/how-to-create-a-twitter-client-on-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
