<?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>Free Time Studios &#187; Core Animation</title>
	<atom:link href="http://www.freetimestudios.com/cat/core-animation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freetimestudios.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Sep 2010 06:55:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fun With Core Animation: Shutter Transition</title>
		<link>http://www.freetimestudios.com/2010/09/06/fun-with-core-animation-shutter-transition/</link>
		<comments>http://www.freetimestudios.com/2010/09/06/fun-with-core-animation-shutter-transition/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 05:38:26 +0000</pubDate>
		<dc:creator>Nathan Eror</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Animation]]></category>
		<category><![CDATA[idevblogaday]]></category>

		<guid isPermaLink="false">http://www.freetimestudios.com/?p=911</guid>
		<description><![CDATA[It&#8217;s all over the Twitter now that I forgot about my first #idevblogaday post. So, in the interest of hitting my deadline (and keeping my slot), this post will be quick. I&#8217;ll also keep the subject matter squarely in my wheelhouse: Core Animation. While preparing the material for my half-day workshop at iPhone/iPad DevCon at [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freetimestudios.com%2F2010%2F09%2F06%2Ffun-with-core-animation-shutter-transition%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freetimestudios.com%2F2010%2F09%2F06%2Ffun-with-core-animation-shutter-transition%2F&amp;source=freetimestudios&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><div class="document">


<p>It&#8217;s all over the Twitter now that I forgot about my first <a class="reference external" href="http://idevblogaday.com/">#idevblogaday</a>
post.  So, in the interest of hitting my deadline (and keeping my slot), this
post will be quick.  I&#8217;ll also keep the subject matter squarely in my
wheelhouse: Core Animation.</p>
<p>While preparing the material for my half-day workshop at <a class="reference external" href="http://iphonedevcon.com/">iPhone/iPad DevCon</a>
at the end of the month, I added some more examples to my <a class="reference external" href="http://github.com/neror/CA360">stable of Core
Animation examples</a>. One of the new examples is based on an idea that has been
rattling around in my head for a while. I call it the shutter transition.
Rather than explain what I mean by &quot;shutter transition&quot;, I&#8217;ll let this quick
screencast do the talking for me:</p>
<iframe class="youtube-player" type="text/html" width="576" height="335"
src="http://www.youtube.com/embed/H8tj7KKJ8gU" frameborder="0"></iframe><p>While this is a fairly simple animation, it was a fun problem to solve. It was
so fun, in fact, that I solved it two different ways. I&#8217;ll briefly cover the
most universally applicable solution today, and we&#8217;ll revisit this code in a
later post to cover the other solution. This is going to go fast, so hold on
tight. Also, please forgive the directness. I&#8217;m on a deadline here.  <img src='http://www.freetimestudios.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The shutter animation can be broken into the following steps:</p>
<ul class="simple">
<li>Flatten the layer to be animated into a single bitmap.</li>
<li>Create multiple <tt class="docutils literal">CALayer</tt> objects of equal size to be the shutters.</li>
<li>Loop over all of the shutter layers and:<ul>
<li>Set the flattened bitmap to the contents of each shutter.</li>
<li>Line up all of the shutter layers horizontally.</li>
<li>Set the <tt class="docutils literal">contentsRect</tt> of each shutter to be offset slightly based
on its position in the list.</li>
</ul>
</li>
<li>Hide the original layer, and show the shutters.</li>
<li>Animate the shutters offscreen, alternating the direction.</li>
<li>Once the shutters are offscreen, remove all of them from their <tt class="docutils literal">superlayer</tt>.</li>
</ul>
<p>Got it? Good.</p>
<p>Let&#8217;s take a look at the code that actually does this. If you are so inclined,
all of the code for the shutter transition is on <a class="reference external" href="http://github.com/neror/CA360/blob/master/Classes/Fun%20Stuff/ShutterTransition.m">github</a>. Feel free to play
with this code and use it however you please in any project. You can also use
it to follow along with this post. For those of you following along in Xcode,
all of the code I&#8217;m about to quote is in the <tt class="docutils literal">doShutterTransition</tt> method.</p>
<p>Let&#8217;s get started.</p>
<p>First, We need to flatten our layer into a single bitmap. The
<tt class="docutils literal">renderInContext:</tt> method on <tt class="docutils literal">CALayer</tt> makes this very easy for us:</p>
<div class="highlight"><pre><span class="n">CGSize</span> <span class="n">layerSize</span> <span class="o">=</span> <span class="n">mainLayer_</span><span class="p">.</span><span class="n">bounds</span><span class="p">.</span><span class="n">size</span><span class="p">;</span>
<span class="n">CGColorSpaceRef</span> <span class="n">colorSpace</span> <span class="o">=</span> <span class="n">CGColorSpaceCreateDeviceRGB</span><span class="p">();</span>
<span class="n">CGContextRef</span> <span class="n">context</span> <span class="o">=</span> <span class="n">CGBitmapContextCreate</span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">layerSize</span><span class="p">.</span><span class="n">width</span><span class="p">,</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">layerSize</span><span class="p">.</span><span class="n">height</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="p">(</span><span class="kt">int</span><span class="p">)</span><span class="n">layerSize</span><span class="p">.</span><span class="n">width</span> <span class="o">*</span> <span class="mi">4</span><span class="p">,</span> <span class="n">colorSpace</span><span class="p">,</span> <span class="n">kCGImageAlphaPremultipliedLast</span><span class="p">);</span>

<span class="p">[</span><span class="n">mainLayer_</span> <span class="nl">renderInContext:</span><span class="n">context</span><span class="p">];</span>
<span class="n">UIImage</span> <span class="o">*</span><span class="n">layerImage</span> <span class="o">=</span> <span class="p">[</span><span class="n">UIImage</span> <span class="nl">imageWithCGImage:</span><span class="n">CGBitmapContextCreateImage</span><span class="p">(</span><span class="n">context</span><span class="p">)];</span>
</pre></div>
<!-- FIXME: broken syntax highlighting with asterisks ** -->
<p>See? I told you it was easy.</p>
<p>You&#8217;ll notice that I create the two animations next. There is a good reason for
this. When an animation is added to a layer, the layer makes a copy of the
<tt class="docutils literal">CAAnimation</tt> object for its own purposes. Since we will be adding the
animations to layers inside of a loop, we can take advantage of this copy
behavior and only create the animations once. That way, we won&#8217;t incur the
overhead of instantiating and throwing away a new <tt class="docutils literal">CAAnimation</tt> object on
every loop iteration.</p>
<p>The animation code is very straightforward:</p>
<div class="highlight"><pre><span class="n">CABasicAnimation</span> <span class="o">*</span><span class="n">slideUp</span> <span class="o">=</span> <span class="p">[</span><span class="n">CABasicAnimation</span> <span class="nl">animationWithKeyPath:</span><span class="s">@&quot;position.y&quot;</span><span class="p">];</span>
<span class="n">slideUp</span><span class="p">.</span><span class="n">toValue</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSNumber</span> <span class="nl">numberWithFloat:</span><span class="o">-</span><span class="p">(</span><span class="n">mainLayer_</span><span class="p">.</span><span class="n">frame</span><span class="p">.</span><span class="n">size</span><span class="p">.</span><span class="n">height</span> <span class="o">/</span> <span class="mf">2.f</span><span class="p">)];</span>
<span class="n">slideUp</span><span class="p">.</span><span class="n">duration</span> <span class="o">=</span> <span class="mf">1.f</span><span class="p">;</span>
<span class="n">slideUp</span><span class="p">.</span><span class="n">timingFunction</span> <span class="o">=</span> <span class="p">[</span><span class="n">CAMediaTimingFunction</span> <span class="nl">functionWithName:</span><span class="n">kCAMediaTimingFunctionEaseInEaseOut</span><span class="p">];</span>
<span class="n">slideUp</span><span class="p">.</span><span class="n">fillMode</span> <span class="o">=</span> <span class="n">kCAFillModeForwards</span><span class="p">;</span>

<span class="n">CABasicAnimation</span> <span class="o">*</span><span class="n">slideDown</span> <span class="o">=</span> <span class="p">[</span><span class="n">CABasicAnimation</span> <span class="nl">animationWithKeyPath:</span><span class="s">@&quot;position.y&quot;</span><span class="p">];</span>
<span class="n">slideDown</span><span class="p">.</span><span class="n">toValue</span> <span class="o">=</span> <span class="p">[</span><span class="n">NSNumber</span> <span class="nl">numberWithFloat:</span><span class="p">(</span><span class="n">mainLayer_</span><span class="p">.</span><span class="n">frame</span><span class="p">.</span><span class="n">size</span><span class="p">.</span><span class="n">height</span> <span class="o">/</span> <span class="mf">2.f</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="n">UIScreen</span> <span class="n">mainScreen</span><span class="p">].</span><span class="n">bounds</span><span class="p">.</span><span class="n">size</span><span class="p">.</span><span class="n">height</span><span class="p">];</span>
<span class="n">slideDown</span><span class="p">.</span><span class="n">duration</span> <span class="o">=</span> <span class="mf">1.f</span><span class="p">;</span>
<span class="n">slideDown</span><span class="p">.</span><span class="n">timingFunction</span> <span class="o">=</span> <span class="p">[</span><span class="n">CAMediaTimingFunction</span> <span class="nl">functionWithName:</span><span class="n">kCAMediaTimingFunctionEaseInEaseOut</span><span class="p">];</span>
<span class="n">slideDown</span><span class="p">.</span><span class="n">fillMode</span> <span class="o">=</span> <span class="n">kCAFillModeForwards</span><span class="p">;</span>
</pre></div>
<!-- FIXME: broken syntax highlighting with asterisks ** -->
<p>Now we need to remove our original layer from the hierarchy and start creating
and adding our &quot;shutters&quot;. We also wrap this whole loop in a <tt class="docutils literal">CATransaction</tt>
block so that the animations are all in sync.</p>
<p>Finally, we set a <tt class="docutils literal">completionBlock</tt> to remove our shutter layers from the
superview once they are offscreen.  Because we&#8217;re using blocks here, this will
only work in iOS 4+.  You could implement an animation delegate if you have to
target anything earlier than iOS 4. You poor, poor soul.</p>
<div class="highlight"><pre><span class="n">NSMutableArray</span> <span class="o">*</span><span class="n">bands</span> <span class="o">=</span> <span class="p">[[</span><span class="n">NSMutableArray</span> <span class="n">alloc</span><span class="p">]</span> <span class="nl">initWithCapacity:</span><span class="n">BAND_COUNT</span><span class="p">];</span>
<span class="p">[</span><span class="n">mainLayer_</span> <span class="n">removeFromSuperlayer</span><span class="p">];</span>

<span class="p">[</span><span class="n">CATransaction</span> <span class="n">begin</span><span class="p">];</span>
<span class="p">[</span><span class="n">CATransaction</span> <span class="nl">setCompletionBlock:</span><span class="o">^</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span>
  <span class="p">[</span><span class="n">bands</span> <span class="nl">enumerateObjectsUsingBlock:</span><span class="o">^</span><span class="p">(</span><span class="kt">id</span> <span class="n">obj</span><span class="p">,</span> <span class="n">NSUInteger</span> <span class="n">idx</span><span class="p">,</span> <span class="kt">BOOL</span> <span class="o">*</span><span class="n">stop</span><span class="p">)</span> <span class="p">{</span>
    <span class="p">[</span><span class="n">obj</span> <span class="nl">setDelegate:</span><span class="nb">nil</span><span class="p">];</span>
    <span class="p">[</span><span class="n">obj</span> <span class="n">removeFromSuperlayer</span><span class="p">];</span>
  <span class="p">}];</span>
<span class="p">}];</span>

<span class="n">CGFloat</span> <span class="n">bandWidth</span> <span class="o">=</span> <span class="n">layerSize</span><span class="p">.</span><span class="n">width</span> <span class="o">/</span> <span class="p">(</span><span class="n">CGFloat</span><span class="p">)</span><span class="n">BAND_COUNT</span><span class="p">;</span>
<span class="k">for</span><span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">BAND_COUNT</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
  <span class="n">CALayer</span> <span class="o">*</span><span class="n">band</span> <span class="o">=</span> <span class="p">[[</span><span class="n">CALayer</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span>
  <span class="n">band</span><span class="p">.</span><span class="n">masksToBounds</span> <span class="o">=</span> <span class="n">YES</span><span class="p">;</span>

  <span class="n">CGFloat</span> <span class="n">xOffset</span> <span class="o">=</span> <span class="mf">1.f</span> <span class="o">/</span> <span class="p">(</span><span class="n">CGFloat</span><span class="p">)</span><span class="n">BAND_COUNT</span><span class="p">;</span>
  <span class="n">band</span><span class="p">.</span><span class="n">bounds</span> <span class="o">=</span> <span class="n">CGRectMake</span><span class="p">(</span><span class="mf">0.f</span><span class="p">,</span> <span class="mf">0.f</span><span class="p">,</span> <span class="n">bandWidth</span><span class="p">,</span> <span class="n">layerSize</span><span class="p">.</span><span class="n">height</span><span class="p">);</span>
  <span class="n">band</span><span class="p">.</span><span class="n">contents</span> <span class="o">=</span> <span class="p">(</span><span class="kt">id</span><span class="p">)[</span><span class="n">layerImage</span> <span class="n">CGImage</span><span class="p">];</span>
  <span class="n">band</span><span class="p">.</span><span class="n">contentsGravity</span> <span class="o">=</span> <span class="n">kCAGravityCenter</span><span class="p">;</span>
  <span class="n">band</span><span class="p">.</span><span class="n">contentsRect</span> <span class="o">=</span> <span class="n">CGRectMake</span><span class="p">(</span><span class="n">xOffset</span> <span class="o">*</span> <span class="n">i</span> <span class="p">,</span> <span class="mf">0.f</span><span class="p">,</span> <span class="n">xOffset</span><span class="p">,</span> <span class="mf">1.f</span><span class="p">);</span>
  <span class="n">CGPoint</span> <span class="n">bandOrigin</span> <span class="o">=</span> <span class="n">mainLayer_</span><span class="p">.</span><span class="n">frame</span><span class="p">.</span><span class="n">origin</span><span class="p">;</span>
  <span class="n">bandOrigin</span><span class="p">.</span><span class="n">x</span> <span class="o">=</span> <span class="n">bandOrigin</span><span class="p">.</span><span class="n">x</span> <span class="o">+</span> <span class="p">(</span><span class="n">bandWidth</span> <span class="o">*</span> <span class="n">i</span><span class="p">);</span>
  <span class="p">[</span><span class="n">band</span> <span class="nl">setValue:</span><span class="p">[</span><span class="n">NSValue</span> <span class="nl">valueWithCGPoint:</span><span class="n">bandOrigin</span><span class="p">]</span> <span class="nl">forKeyPath:</span><span class="s">@&quot;frame.origin&quot;</span><span class="p">];</span>

  <span class="p">[</span><span class="n">self</span><span class="p">.</span><span class="n">view</span><span class="p">.</span><span class="n">layer</span> <span class="nl">addSublayer:</span><span class="n">band</span><span class="p">];</span>

  <span class="p">[</span><span class="n">band</span> <span class="nl">addAnimation:</span><span class="p">(</span><span class="n">i</span> <span class="o">%</span> <span class="mi">2</span><span class="p">)</span> <span class="o">?</span> <span class="n">slideUp</span> <span class="o">:</span> <span class="n">slideDown</span> <span class="nl">forKey:</span><span class="nb">nil</span><span class="p">];</span>
  <span class="p">[</span><span class="n">bands</span> <span class="nl">addObject:</span><span class="n">band</span><span class="p">];</span>
  <span class="p">[</span><span class="n">band</span> <span class="n">release</span><span class="p">];</span>
<span class="p">}</span>
<span class="p">[</span><span class="n">CATransaction</span> <span class="n">commit</span><span class="p">];</span>
<span class="p">[</span><span class="n">bands</span> <span class="n">release</span><span class="p">];</span>
</pre></div>
<!-- FIXME: broken syntax highlighting with asterisks ** -->
<p>That&#8217;s all there is to it. The real key here is the <tt class="docutils literal">contentsRect</tt> attribute
of <tt class="docutils literal">CALayer</tt>. This example was actually created to illustrate its usage
(among other things). <tt class="docutils literal">contentsRect</tt> defines what portion to show of the
image in the layer&#8217;s <tt class="docutils literal">contents</tt> attribute. You&#8217;ll notice that the elements of
the <tt class="docutils literal">contentsRect</tt> are normalized meaning that each element is in the range
<tt class="docutils literal">0 - 1</tt>. Think of the origin and size of the <tt class="docutils literal">contentsRect</tt> as percentages.</p>
<p>I know we blew through that example really quickly. I&#8217;ll be more gentle next
time. For now, I need to get this published to meet <a class="reference external" href="http://twitter.com/mysterycoconut">&#64;mysterycoconut</a>&#8216;s
deadline. <img src='http://www.freetimestudios.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Until next week&#8230;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.freetimestudios.com/2010/09/06/fun-with-core-animation-shutter-transition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing FTUtils: Open Source Utilities for iPhone Developers</title>
		<link>http://www.freetimestudios.com/2010/01/05/introducing-ftutils-open-source-utilities-for-iphone-developers/</link>
		<comments>http://www.freetimestudios.com/2010/01/05/introducing-ftutils-open-source-utilities-for-iphone-developers/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 19:33:13 +0000</pubDate>
		<dc:creator>Nathan Eror</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Animation]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.freetimestudios.com/?p=252</guid>
		<description><![CDATA[For my Core Animation presentation at 360idev last year, I created a bunch of sample code to show how simple and powerful Core Animation is. I also promised that I would update the sample code with even more advanced examples. That has not really happened (yet!), and it is time for me to atone. I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freetimestudios.com%2F2010%2F01%2F05%2Fintroducing-ftutils-open-source-utilities-for-iphone-developers%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freetimestudios.com%2F2010%2F01%2F05%2Fintroducing-ftutils-open-source-utilities-for-iphone-developers%2F&amp;source=freetimestudios&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>For my <a href="http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/" title="Core Animation: Hands-On @ 360idev. Yes, There is More! | Free Time Studios">Core Animation presentation</a> at <a href="http://www.360idev.com/" title="360|iDev the Premiere iPhone developer conference in the world!">360idev</a> last year, I created a bunch of <a href="http://github.com/neror/CA360" title="neror's CA360 at master - GitHub">sample code</a> to show how simple and powerful Core Animation is. I also promised that I would update the sample code with even more advanced examples. That has not really happened (yet!), and it is time for me to atone.</p>

<p>I am very excited to officially release a collection of utility code that I have accumulated over the past year: <a href="http://ftutils.com/" title="FTUtils - Open Source Tools for iPhone Developers"><strong>FTUtils</strong></a>! It is the first dependency I add to all of my projects, and I have already received enthusiastic feedback from developers who have stumbled on the <a href="http://github.com/neror/ftutils" title="neror's ftutils at master - GitHub">github project</a>.</p>

<p>It probably comes as no surprise that the bulk of <strong>FTUtils</strong> contains enhancements and extensions to the Core Animation API (called FTAnimation). I use Core Animation a lot, and I have tried to find elegant ways to round off some of the sharper edges of the API. <strong>FTUtils</strong> is not only about Core Animation, though. It features:</p>

<ul>
<li>A category on <code>UIView</code> that puts 13+ canned animations only a method call away.</li>
<li>Access to the <code>CAAnimation</code> objects for the canned animations so you can mix and match them all you want.</li>
<li>Implementation of the target/action pattern for animation delegate callbacks. No more huge <code>animationDidStop:finished:</code> methods!</li>
<li>Simple chaining of an arbitrary number of animations.</li>
<li>Embedding of a pre or post animation delay directly in the <code>CAAnimation</code> object (useful for chaining).</li>
<li><code>performSelector*</code> methods built for calling delegates that elegantly handle non-existent selectors and allow the passing of primitives as parameters.</li>
<li>Simple methods for reversing arrays.</li>
<li>A collection of macros to make common code patterns simpler to use.</li>
</ul>

<p>Since I use <strong>FTUtils</strong> in all of my projects, it is updated regularly with bug fixes and new features. Currently, I am working hard at documenting the whole library at <a href="http://ftutils.com/" title="FTUtils">ftutils.com</a>, and I will be pushing updates to the site as I finish chunks of the docs.</p>

<p>The iPhone developer community is an active and friendly one, and it has been very good to me. I am glad to have something to give back. Also, for those of you <a href="http://360idev-nathane.eventbrite.com/" title="360|iDev San Jose - April 11-14, 2010 - Eventbrite">planning to attend 360idev this April</a> (you should go&#8230;really), I will be speaking about advanced uses of Core Animation including an explanation of how everything in FTAnimation works.</p>

<h2>One more thing&#8230;</h2>

<p>Here&#8217;s a screencast showing off the canned animations in <strong>FTUtils</strong>. The code for this app is in the <a href="http://github.com/neror/ftutils/tree/master/Examples/" title="Examples at master from neror's ftutils - GitHub">Examples directory</a> of the project.</p>

<p>Enjoy!</p>

<p><object height='385' width='480'><param name='movie' value='http://www.youtube.com/v/UMYP-qEKs9Q&#038;hl=en_US&#038;fs=1&#038;' /><param name='allowFullScreen' value='true' /><param name='allowscriptaccess' value='always' /><embed src='http://www.youtube.com/v/UMYP-qEKs9Q&#038;hl=en_US&#038;fs=1&#038;' allowfullscreen='true' type='application/x-shockwave-flash' allowscriptaccess='always' height='385' width='480' /></object></p>

<p><a href="http://www.iphonekicks.com/kick/?url=http%3a%2f%2fwww.freetimestudios.com%2f2010%2f01%2f05%2fintroducing-ftutils-open-source-utilities-for-iphone-developers%2f"><img src="http://www.iphonekicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.freetimestudios.com%2f2010%2f01%2f05%2fintroducing-ftutils-open-source-utilities-for-iphone-developers%2f" border="0" alt="kick it on iPhoneKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.freetimestudios.com/2010/01/05/introducing-ftutils-open-source-utilities-for-iphone-developers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Core Animation: Hands-On @ 360idev. Yes, There is More!</title>
		<link>http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/</link>
		<comments>http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 22:03:14 +0000</pubDate>
		<dc:creator>Nathan Eror</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Core Animation]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.freetimestudios.com/?p=64</guid>
		<description><![CDATA[I was surprised and excited to see the standing room only turnout for my in depth Core Animation talk at 360idev this week. I thought it would be a popular topic, but Collin really got people fired up to learn more during his introductory talk. I was able to cover quite a bit of material [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.freetimestudios.com%2F2009%2F10%2F02%2Fcore-animation-hands-on-360idev-yes-there-is-more%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.freetimestudios.com%2F2009%2F10%2F02%2Fcore-animation-hands-on-360idev-yes-there-is-more%2F&amp;source=freetimestudios&amp;style=normal&amp;service=bit.ly" height="61" width="50" />
			</a>
		</div><p>I was surprised and excited to see the standing room only turnout for my in depth Core Animation talk at <a href="http://www.360idev.com/" title="360|iDev the Premiere iPhone developer conference in the world!">360idev</a> this week. I thought it would be a popular topic, but <a href="http://collindonnell.com/" title="Collin Donnell">Collin</a> really got people fired up to learn more during his introductory talk. I was able to cover quite a bit of material in my 80 minutes, and I got some awesome feedback from the developers in attendance. The most common thing I heard from developers was some variation of &#8220;I didn&#8217;t know I could do that!&#8221; or &#8220;You just saved me <em>X</em> lines of code!&#8221; It was simultaneously flattering and disappointing.</p>

<p><strong>SlapHappy!</strong> is written entirely with Core Animation, and I&#8217;ve dug deeper into the API than most people outside of Apple. I&#8217;d forgotten how much of the stuff I know was picked up through a combination of trial and error, debugging, digging into headers, and re-reading <a href="http://pragprog.com/titles/bdcora/core-animation-for-mac-os-x-and-the-iphone" title="The Pragmatic Bookshelf | Core Animation for Mac OS X and the iPhone">books</a> and documentation. I didn&#8217;t expect that others have been as intimate with Core Animation as I have, but I was still a little surprised to see the lights go on in people&#8217;s heads as I spoke.</p>

<p>My experience presenting at 360idev proved what I had suspected: Many iPhone developers look at Core Animation as a low level framework hidden inside the black box of UIKit. I&#8217;d like to change that perception. While you can write an entire iPhone app without even knowing that Core Animation exists, just a basic understanding and application of the API and its concepts can go a long way to separate your app from the other 85,000+ in the app store.</p>

<p>Since I was not able to cover everything I wanted to in my 80 minutes at 360idev, I am putting together a <a href="http://www.freetimestudios.com/cat/core-animation/" title="Core Animation | Free Time Studios">series of blog posts</a> with Core Animation tips, tricks, lessons learned, and code. Consider this the first in the series. I&#8217;ll kick it off with my slide deck and a link to the more than 1,400 lines of sample code I prepared for the presentation.</p>

<ul>
<li><strong>The Slide Deck:</strong> <a href="http://www.freetimestudios.com/wp-content/uploads/2009/10/NathanEror_CoreAnimation_360idev.pdf" title="">Core Animation Hands-On: Building Complex and Attractive Cocoa Touch Interfaces</a></li>
<li><strong>The Code:</strong> <a href="http://github.com/neror/CA360" title="neror's CA360 at master - GitHub">http://github.com/neror/CA360</a></li>
</ul>

<p>I will be adding to the sample code project as I work on this series so make sure to <a href="http://github.com/neror/CA360/toggle_watch">watch</a> the project on github. Also, if you have any burning Core Animation questions that you&#8217;d like to see covered in this series, drop me an email or add a comment to this post.</p>

<p>Oh, and thank you again <a href="http://lordbron.wordpress.com/" title="Tom&#8217;s Blog">Tom</a> and <a href="http://johnwilker.com/" title="Community, Code, Awesomeness">John</a> for giving me the opportunity to be a part of such a tremendous show!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.freetimestudios.com/2009/10/02/core-animation-hands-on-360idev-yes-there-is-more/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
