<?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>Floyd's Thoughts... &#187; IPhone</title>
	<atom:link href="http://www.floydprice.com/category/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.floydprice.com</link>
	<description>Because Everything is Interesting!!!</description>
	<lastBuildDate>Fri, 18 Jun 2010 05:32:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to respond to the IPhone Shake Gesture</title>
		<link>http://www.floydprice.com/2009/10/how-to-respond-to-the-iphone-shake-gesture/</link>
		<comments>http://www.floydprice.com/2009/10/how-to-respond-to-the-iphone-shake-gesture/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 19:48:02 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[UIKit]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=148</guid>
		<description><![CDATA[The IPhone 3.0 SDK includes support for detecting when a user &#8220;Shakes&#8221; the IPhone, this is intended to be a usability feature allowing app developers to implement Refresh or Read All functions on shake, wow those crazy guys at Apple really do know how to innovate! It&#8217;s pretty easy to implement all you need to [...]]]></description>
			<content:encoded><![CDATA[<p>The IPhone 3.0 SDK includes support for detecting when a user &#8220;Shakes&#8221; the IPhone, this is intended to be a usability feature allowing app developers to implement Refresh or Read All functions on shake, wow those crazy guys at Apple really do know how to innovate!</p>
<p>It&#8217;s pretty easy to implement all you need to do is register your view controller as the first responder and listen for the motion event.</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span> viewDidAppear<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>BOOL<span style="color: #009900;">&#41;</span>animated<span style="color: #009900;">&#123;</span>
	<span style="color: #009900;">&#91;</span>super viewDidAppear<span style="color: #339933;">:</span>animated<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>self becomeFirstResponder<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Once your controller is the First Responder you can receive the motion event like so:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>motionEnded<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>UIEventSubtype<span style="color: #009900;">&#41;</span>motion withEvent<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</span>UIEvent <span style="color: #339933;">*</span><span style="color: #009900;">&#41;</span>event
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>motion <span style="color: #339933;">==</span> UIEventSubtypeMotionShake<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		refresh<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This will work beautifully but you will however notice that any views you present over this one will not respond to all touch events, for instance the keyboard will not show when you touch a text field, this is because you need to resign the First Responder before you present the view like so:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>IBAction<span style="color: #009900;">&#41;</span>showMyCustomView <span style="color: #009900;">&#123;</span>    
	<span style="color: #009900;">&#91;</span>self resignFirstResponder<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#91;</span>self presentModalViewController<span style="color: #339933;">:</span>myCustomViewController animated<span style="color: #339933;">:</span>YES<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see this is all pretty easy and the only gotcha is the First Responder stuff, which also is pretty trivial.</p>
<p>Enjoy and please people, Shake Responsibly!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2009/10/how-to-respond-to-the-iphone-shake-gesture/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IPhone 3g is not water resistant!</title>
		<link>http://www.floydprice.com/2008/08/iphone-3g-is-not-water-resistant/</link>
		<comments>http://www.floydprice.com/2008/08/iphone-3g-is-not-water-resistant/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 21:32:44 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Happy]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[Reality]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=115</guid>
		<description><![CDATA[Yesterday evening i spent a couple of hours sitting in my garden reading while the summer evening sun rained down. It was one of those peaceful moments where time seemed to stand still. This morning when letting the Dog out to do what ever it is she does first thing in the morning, i took [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday evening i spent a couple of hours sitting in my garden reading while the summer evening sun rained down. It was one of those peaceful moments where time seemed to stand still.</p>
<p>This morning when letting the Dog out to do what ever it is she does first thing in the morning, i took a stroll down the garden to reminisce about the night before only to realize that i had left my IPhone 3G on the hammock.</p>
<p>The sun that had blessed us the night before had been replaced by Rain and the IPhone was soaked! Needless to say, it doesn&#8217;t switch on any more and I&#8217;m gutted! </p>
<p>Fortunately i still have my old IPhone 2G so i can use that, but every time i look at it, it reminds me of my drowned little baby that was only a few months old <img src='http://www.floydprice.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Oh well life goes on, I&#8217;ll get the insurance company to send me a new one tomorrow <img src='http://www.floydprice.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/iphone-3g-is-not-water-resistant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily Dose #4</title>
		<link>http://www.floydprice.com/2008/08/daily-dose-4/</link>
		<comments>http://www.floydprice.com/2008/08/daily-dose-4/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 17:41:34 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Daily Dose]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Team]]></category>
		<category><![CDATA[ThoughtWorks]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=93</guid>
		<description><![CDATA[Bourbon Creams and Bananas are not a balanced diet. Phusion Passenger on Amazon EC2 Some useful stuff relating to Phusion Passenger (mod_rails) on Amazons Elastic Computing Cloud. Moving from Java to C# A senior ThoughtWorker talks about his first C# project 10 years after he first tasted the Java bean. IPhone GUI PSD Some photoshop [...]]]></description>
			<content:encoded><![CDATA[<p>Bourbon Creams and Bananas are not a balanced diet.</p>
<p><a href="http://nutrun.com/weblog/phusion-passenger-on-amazon-ec2/">Phusion Passenger on Amazon EC2</a><br />
Some useful stuff relating to Phusion Passenger (mod_rails) on Amazons Elastic Computing Cloud.</p>
<p><a href="http://markthomas.info/blog/?p=47">Moving from Java to C#</a><br />
A senior <a href="http://www.thoughtworks.com">ThoughtWorker</a> talks about his first C# project 10 years after he first tasted the Java bean.</p>
<p><a href="http://www.teehanlax.com/blog/?p=447">IPhone GUI PSD</a><br />
Some photoshop goodies for mocking up IPhone UI&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/daily-dose-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily Dose #3</title>
		<link>http://www.floydprice.com/2008/08/daily-dose-3/</link>
		<comments>http://www.floydprice.com/2008/08/daily-dose-3/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 20:00:42 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Daily Dose]]></category>
		<category><![CDATA[IPhone]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=57</guid>
		<description><![CDATA[More estimating today! Calculating velocity tomorrow&#8230; Joy! Y Combinator’s Demo Day Summer 2008 Some y-combinator startups show of there stuff. YUI 3 Preview Personally i prefer ExtJS but more choice in this area is good for all. AppStore Developer TapTapTap Publishes Sales Figures Interesting stats from TapTapTap &#8211; Makes me think I should building IPhone [...]]]></description>
			<content:encoded><![CDATA[<p>More estimating today! Calculating velocity tomorrow&#8230; Joy!</p>
<p><a href="http://www.techcrunch.com/2008/08/14/y-combinators-demo-day-summer-2008/">Y Combinator’s Demo Day Summer 2008</a><br />
Some y-combinator startups show of there stuff.</p>
<p><a href="http://yuiblog.com/blog/2008/08/13/yui3pr1/">YUI 3 Preview</a><br />
Personally i prefer <a href="http://extjs.com">ExtJS</a> but more choice in this area is good for all.</p>
<p><a href="http://www.techcrunch.com/2008/08/13/appstore-developer-taptaptap-publishes-sales-figures/">AppStore Developer TapTapTap Publishes Sales Figures</a><br />
Interesting stats from TapTapTap &#8211; Makes me think I should building IPhone apps <img src='http://www.floydprice.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/daily-dose-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily Dose #1</title>
		<link>http://www.floydprice.com/2008/08/daily-dose/</link>
		<comments>http://www.floydprice.com/2008/08/daily-dose/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 18:08:28 +0000</pubDate>
		<dc:creator>Floyd Price</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Daily Dose]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.floydprice.com/?p=3</guid>
		<description><![CDATA[A few links to get us going&#8230; IPhone Development iphone-universal Normalized CSS &#038; HTML framework to develop iPhone webdev applications C# Simple REST Client Some .NET code for consuming RESTful web services. Rails Understanding Map and Reduce Some underused collection functions in Ruby OS X Utils Expandrive Cool app that allows you to mount a [...]]]></description>
			<content:encoded><![CDATA[<p>A few links to get us going&#8230;</p>
<h3>IPhone Development</h3>
<p><a href="http://code.google.com/p/iphone-universal/">iphone-universal</a><br />
Normalized CSS &#038; HTML framework to develop iPhone webdev applications</p>
<h3>C#</h3>
<p><a href="http://jamescrisp.org/2008/08/08/simple-rest-client/">Simple REST Client</a><br />
Some .NET code for consuming RESTful web services.</p>
<h3>Rails</h3>
<p><a href="http://railspikes.com/2008/8/11/understanding-map-and-reduce">Understanding Map and Reduce</a><br />
Some underused collection functions in Ruby</p>
<h3>OS X Utils</h3>
<p><a href="http://www.magnetk.com/expandrive">Expandrive</a><br />
Cool app that allows you to mount a sFtp folder.</p>
<p><a href="http://www.red-sweater.com/marsedit/">MarsEdit</a><br />
Powerful Blog Publishing For Your Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.floydprice.com/2008/08/daily-dose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
