<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
 	<channel>
		<title>Grokking Cocoa</title>
		<link>http://www.grokkingcocoa.com/</link>
		<description></description>
		<language>en</language>
		<lastBuildDate>Tue, 01 May 2012 23:24:32 -0700</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Sandvox 2.2.6b8</generator>
		<item>
			<title>Always set NSError pointers to nil, Duh!</title>
			<link>http://www.grokkingcocoa.com/always-set-nserror-pointers.html</link>
			<description>
				&lt;div class="article-summary"&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;This is one of those errors that just make you go, duh!&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;Can you spot the problem with the following two snippets of code?&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;Snippet 1&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;   &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #7e11ad;"&gt;NSError&lt;/span&gt; &lt;span style="letter-spacing: 0.0px;"&gt;*error;&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;   &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #d200a5;"&gt;if&lt;/span&gt; &lt;span style="letter-spacing: 0.0px;"&gt;(![someObject&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;performFetch&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;:&amp;amp;error])&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;       &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;NSLog&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;(&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #e90000;"&gt;@"%@: %@"&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;, [error&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;description&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;], [error&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;userInfo&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;]);&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;Snippet 2&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;   &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #7e11ad;"&gt;NSError&lt;/span&gt; &lt;span style="letter-spacing: 0.0px;"&gt;*error;&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;   &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #d200a5;"&gt;if&lt;/span&gt; &lt;span style="letter-spacing: 0.0px;"&gt;(![&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #d200a5;"&gt;self&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;.&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #368288;"&gt;someObject&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;performFetch&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;:&amp;amp;error])&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;       &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;NSLog&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;(&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #e90000;"&gt;@"%@: %@"&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;, [error&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;description&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;], [error&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;userInfo&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;]);&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;At first this does not appear to be a problem, but what if someObject is nil in the first case or the accessor self.someObject returns nil in the second?  If either is nil then the message is sent to the nil object which will cause the conditional to fire (a message sent to the nil object returns 0 or nil). Now when error is used it has an uninitialized value, which will probably cause things to blow up, but now always.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;The solution to initialize error to nil,&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;   &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #7e11ad;"&gt;NSError&lt;/span&gt; &lt;span style="letter-spacing: 0.0px;"&gt;*error =&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #d200a5;"&gt;nil&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;;&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;   &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #d200a5;"&gt;if&lt;/span&gt; &lt;span style="letter-spacing: 0.0px;"&gt;(![&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #d200a5;"&gt;self&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;.&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #368288;"&gt;someObject&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;performFetch&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;:&amp;amp;error])&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"&gt;&lt;tt&gt;&lt;span style="letter-spacing: 0.0px;"&gt;       &lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;NSLog&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;(&lt;/span&gt;&lt;span style="letter-spacing: 0.0px color: #e90000;"&gt;@"%@: %@"&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;, [error&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;description&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;], [error&lt;/span&gt; &lt;span style="letter-spacing: 0.0px color: #480085;"&gt;userInfo&lt;/span&gt;&lt;span style="letter-spacing: 0.0px;"&gt;]);&lt;/span&gt;&lt;/tt&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana; min-height: 15.0px;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;Or in some cases add a check for the NSError also,&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
			</description>
			<pubDate>Fri, 04 Jun 2010 05:09:40 -0700</pubDate>
			<guid>http://www.grokkingcocoa.com/always-set-nserror-pointers.html</guid>
            
			<category>NSError Code Programming Cocoa</category>
		</item>
		<item>
			<title>No Love in the App Store</title>
			<link>http://www.grokkingcocoa.com/no-love-in-the-app-store.html</link>
			<description>
				&lt;div class="article-summary"&gt;&lt;p&gt;One of the problems, the main problem, of Apple's App Store is hierarchy.
&lt;/p&gt;&lt;p&gt;What? What does structure have to do with it. I am not talking about structure as in a folder hierarchy, but more to do with the pecking order. I have to explore this idea a little before I can tie it to the App Store.
&lt;/p&gt;&lt;p&gt;I am an Indie developer. I don't do this for no other reason but that I love crafting software. I am in someways like that stereotypical computer geek. I dislike hierarchy. The hierarchy in the pecking order. I want to do things for the heck of it, because I love to do them, to explore, to learn. In some ways this is antiauthoritarian. It is the way of the creative.
&lt;/p&gt;&lt;p&gt;Becoming part of the pecking order starts to define who you are. It becomes a status thing. It defines your position in the company. You start making decisions with regard to the hierarchy. You might not even realize this, but how many decisions are made because of your place in the company, of your place in the hierarchy. Think about it.
&lt;/p&gt;&lt;/div&gt;
			</description>
			<pubDate>Sun, 30 May 2010 06:51:23 -0700</pubDate>
			<guid>http://www.grokkingcocoa.com/no-love-in-the-app-store.html</guid>
            
			<category>App Store</category><category>Indie Development</category><category>iPhone</category><category>iPad</category>
		</item>
		<item>
			<title>A Simple Way to Animate a UIBarButtonItem</title>
			<link>http://www.grokkingcocoa.com/a-simple-way-to-animate-a-u.html</link>
			<description>
				&lt;div class="article-summary"&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;My first pass solution to animate a UIBarButtonItem was to initialize it's custom view with a UIImageView. The UIImageView can then be set up for animation with multiple images. Calling startAnimaiton/stopAnimation on the UIImaveView will then animate. This is great for animating buttons in tool and tab bars.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;&lt;b&gt;One problem&lt;/b&gt; is that the when initializing the UIImageView into the UIBarButtonItem, the UIBarButtonItem does not respond to touch events. Yuk.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;A simple solution is to initialize the UIBarButtonItem custom view with a UIButton, then touch events for the UIBarButtonItem item are handle correctly.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;But the UIButton does not have a way to use a UIImageView only UIImages. We want to use the UIImageView for its simple animation.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;&lt;b&gt;The solution&lt;/b&gt; is to add the UIImageView as a subview of the UIButton.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 16.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="letter-spacing: 0.0px;"&gt;Here is the code.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 29.7px; text-indent: -2.5px; font: 12.0px Anonymous; color: #480085;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="color: #7e11ad;"&gt;&lt;font face="'Courier New'"&gt;NSArray&lt;/font&gt;&lt;/span&gt; &lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;*images = [&lt;/font&gt;&lt;/span&gt;&lt;span style="color: #7e11ad;"&gt;&lt;font face="'Courier New'"&gt;NSArray&lt;/font&gt;&lt;/span&gt; &lt;font face="'Courier New'"&gt;arrayWithObjects&lt;/font&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Anonymous; color: #e90000;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;        [&lt;/font&gt;&lt;/span&gt;&lt;span style="color: #7e11ad;"&gt;&lt;font face="'Courier New'"&gt;UIImage&lt;/font&gt;&lt;/span&gt; &lt;span style="color: #480085;"&gt;&lt;font face="'Courier New'"&gt;imageNamed&lt;/font&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;font face="'Courier New'"&gt;@"image0.png"&lt;/font&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;],&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Anonymous; color: #e90000;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;        [&lt;/font&gt;&lt;/span&gt;&lt;span style="color: #7e11ad;"&gt;&lt;font face="'Courier New'"&gt;UIImage&lt;/font&gt;&lt;/span&gt; &lt;span style="color: #480085;"&gt;&lt;font face="'Courier New'"&gt;imageNamed&lt;/font&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;:&lt;/font&gt;&lt;/span&gt;&lt;font face="'Courier New'"&gt;@"image1.png"&lt;/font&gt;&lt;span style="color: black;"&gt;&lt;font face="'Courier New'"&gt;],&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Anonymous;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;font face="'Courier New'"&gt;       &lt;/font&gt; &lt;span style="color: #d200a5;"&gt;&lt;font face="'Courier New'"&gt;nil&lt;/font&gt;&lt;/span&gt;&lt;font face="'Courier New'"&gt;];&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 29.7px; text-indent: -2.5px; font: 10.0px Anonymous; color: #490085;"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="6"&gt;&lt;font face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#480085" face="Anonymous, Helvetica, Arial, sans-serif" size="2"&gt;&lt;font color="#000000" face="Verdana, Helvetica, Arial, sans-serif" size="3"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;imageView = [[UIImageView &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="letter-spacing: 0.0px;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;alloc&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;] &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="letter-spacing: 0.0px;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;initWithImage&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;:[UIImage  &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="letter-spacing: 0.0px;"&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;imageNamed&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;span style="font-size: 12px;"&gt;&lt;font face="'Courier New'"&gt;:@"image0.png"]];&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="'Courier New'"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;
			</description>
			<pubDate>Sat, 29 May 2010 23:24:01 -0700</pubDate>
			<guid>http://www.grokkingcocoa.com/a-simple-way-to-animate-a-u.html</guid>
            
			<category>iPhone</category><category>code snippets</category><category>technical</category>
		</item>
		<item>
			<title>How to Debug iPhone Unit Tests</title>
			<link>http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html</link>
			<description>
				&lt;div class="article-summary"&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;[Updated the troubleshooting section 10/4/2009]&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;The unit tests are finally set up for the iPhone. You can start doing some Test Driven Development, but one is failing. I've read Apple's documentation, but how do I debug the blasted thing?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;NSLog messages can be scattered throughout the code. Their output is sent to the console, but this is a pain. There must be a better way.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;This is one area that needs to be improved in Xcode. There is not even documentation on how to debug unit tests.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;b&gt;Here's how to do it.&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;The following assumes that you have set up the unit tests using the templates in Xcode and follows along with Apple's example in their &lt;a href="http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html#//apple_ref/doc/uid/TP40007959-CH20-SW3"&gt;&lt;span&gt;iPhone Development Guide&lt;/span&gt;&lt;/a&gt;. If you have not already set up your units test then the &lt;a href="http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html#//apple_ref/doc/uid/TP40007959-CH20-SW3"&gt;&lt;span&gt;iPhone Development Guide&lt;/span&gt;&lt;/a&gt; is a good place to start. I am also using Xcode 3.2.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;b&gt;Three steps that need to be performed.&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;    1. Setup a target that contains the unit tests, but does not run them.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;    2. Setup the otest executable to run the tests.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Verdana;"&gt;&lt;font face="Helvetica, Helvetica, Arial, sans-serif"&gt;&lt;font face="Verdana, Helvetica, Arial, sans-serif"&gt;    3. Setup the otest environment so that otest can find your unit tests.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/div&gt;
			</description>
			<pubDate>Thu, 08 Oct 2009 23:45:02 -0700</pubDate>
			<guid>http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html</guid>
            
			<category>iPhone</category><category>unit test</category><category>debugging</category>
		</item>
		<item>
			<title>Hello World</title>
			<link>http://www.grokkingcocoa.com/hello_world.html</link>
			<description>
				&lt;div class="article-summary"&gt;&lt;p&gt;What else should a geeky programmer's first post be?
&lt;/p&gt;&lt;/div&gt;
			</description>
			<pubDate>Thu, 08 Oct 2009 22:49:35 -0700</pubDate>
			<guid>http://www.grokkingcocoa.com/hello_world.html</guid>
            
			
		</item>
 	</channel>
</rss>

