<?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>Tom Dalling &#187; Cocoa</title>
	<atom:link href="http://www.tomdalling.com/blog/category/cocoa/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tomdalling.com/blog</link>
	<description>Thoughts of a software developer</description>
	<lastBuildDate>Thu, 17 May 2012 08:35:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>When A Café Is Not A Café – A Short Lesson In Unicode Featuring NSString</title>
		<link>http://www.tomdalling.com/blog/coding-tips/when-a-cafe-is-not-a-cafe-a-short-lesson-in-unicode-featuring-nsstring</link>
		<comments>http://www.tomdalling.com/blog/coding-tips/when-a-cafe-is-not-a-cafe-a-short-lesson-in-unicode-featuring-nsstring#comments</comments>
		<pubDate>Thu, 08 Mar 2012 10:38:31 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/blog/?p=576</guid>
		<description><![CDATA[Let&#8217;s start with two exotic strings (console output is in the code comments): NSString* apples = NSGetFrenchWord&#40;&#41;; NSString* oranges = NSGetFrenchWord&#40;&#41;; &#160; NSLog&#40;@&#34;apples == '%@'&#34;, apples&#41;; //apples == 'café' NSLog&#40;@&#34;oranges == '%@'&#34;, oranges&#41;; //oranges == 'café' They look identical, but looks can be deceiving. NSLog&#40;@&#34;isEqual? %@&#34;, &#91;apples isEqual:oranges&#93; ? @&#34;YES&#34; : @&#34;NO&#34;&#41;; //isEqual? NO NSLog&#40;@&#34;[apples length] [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/coding-tips/when-a-cafe-is-not-a-cafe-a-short-lesson-in-unicode-featuring-nsstring/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gotchas With Grand Central Dispatch (libdispatch) And Blocks</title>
		<link>http://www.tomdalling.com/blog/cocoa/gotchas-with-grand-central-dispatch-libdispatch-and-blocks</link>
		<comments>http://www.tomdalling.com/blog/cocoa/gotchas-with-grand-central-dispatch-libdispatch-and-blocks#comments</comments>
		<pubDate>Fri, 02 Mar 2012 07:20:59 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/blog/?p=563</guid>
		<description><![CDATA[GCD is a nice replacement for the old performSelectorInBackground:withObject: and performSelectorOnMainThread:withObject:waitUntilDone: methods and NSOperation. It&#8217;s also a nice supplement to NSThread. However, I think it was over-hyped a little bit by Apple when it was first released. You probably have all these random deadlocks and race conditions and stuff whenever you use multiple threads, but [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/gotchas-with-grand-central-dispatch-libdispatch-and-blocks/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Const Correctness For NSString (And Pointers In General)</title>
		<link>http://www.tomdalling.com/blog/coding-tips/const-correctness-for-nsstring-and-pointers-in-general</link>
		<comments>http://www.tomdalling.com/blog/coding-tips/const-correctness-for-nsstring-and-pointers-in-general#comments</comments>
		<pubDate>Fri, 16 Dec 2011 01:38:00 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Coding Tips]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/blog/?p=552</guid>
		<description><![CDATA[So you&#8217;re implementing a new notification and you want the name to be a constant. Easy, right? const NSString* VTMyNewNotification; If that&#8217;s how you do constants, you&#8217;re not doing it quite right. Try assign a new value to the alleged constant and watch in horror as the compiler doesn&#8217;t stop you. This is because when [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/coding-tips/const-correctness-for-nsstring-and-pointers-in-general/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Blocks (i.e. Closures) To Improve Transactional Code</title>
		<link>http://www.tomdalling.com/blog/cocoa/using-blocks-i-e-closures-to-improve-transactional-code</link>
		<comments>http://www.tomdalling.com/blog/cocoa/using-blocks-i-e-closures-to-improve-transactional-code#comments</comments>
		<pubDate>Sun, 21 Nov 2010 03:35:21 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/blog/?p=509</guid>
		<description><![CDATA[I stumbled across a nice article by Jonathan Dann about using blocks to improve transactional code. When I say &#34;transactional&#34; code, I mean code that has an opening, a middle, and a closing, where the opening and the closing have to be matched. You see it in a few places in Cocoa, such as: KVO: [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/using-blocks-i-e-closures-to-improve-transactional-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Cocoa Bindings Work (via KVC and KVO)</title>
		<link>http://www.tomdalling.com/blog/cocoa/how-cocoa-bindings-work-via-kvc-and-kvo</link>
		<comments>http://www.tomdalling.com/blog/cocoa/how-cocoa-bindings-work-via-kvc-and-kvo#comments</comments>
		<pubDate>Fri, 05 Nov 2010 01:41:26 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/blog/?p=490</guid>
		<description><![CDATA[Cocoa bindings can be a little confusing, especially to newcomers. Once you have an understanding of the underlying concepts, bindings aren&#8217;t too hard. In this article, I&#8217;m going to explain the concepts behind bindings from the ground up; first explaining Key-Value Coding (KVC), then Key-Value Observing (KVO), and finally explaining how Cocoa bindings are built [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/how-cocoa-bindings-work-via-kvc-and-kvo/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AspectObjectiveC framework 1.0 Release</title>
		<link>http://www.tomdalling.com/blog/cocoa/aspectobjectivec-framework-1-0-release</link>
		<comments>http://www.tomdalling.com/blog/cocoa/aspectobjectivec-framework-1-0-release#comments</comments>
		<pubDate>Fri, 29 Oct 2010 05:16:49 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/blog/?p=482</guid>
		<description><![CDATA[I&#8217;ve (finally) released version 1.0 of AOC. I could go on improving it forever, but it&#8217;s good enough to release so I&#8217;m going to set it free in the wild. Give it a spin, tell your neighbors, and let me know what you think. Manual: http://www.tomdalling.com/aoc_doc_mirror/ API Docs: http://www.tomdalling.com/aoc_doc_mirror/api/ Source/project: http://github.com/tomdalling/AspectObjectiveC Download (framework compiled for [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/aspectobjectivec-framework-1-0-release/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why performSelector: Is More Dangerous Than I Thought</title>
		<link>http://www.tomdalling.com/blog/cocoa/why-performselector-is-more-dangerous-than-i-thought</link>
		<comments>http://www.tomdalling.com/blog/cocoa/why-performselector-is-more-dangerous-than-i-thought#comments</comments>
		<pubDate>Fri, 14 May 2010 07:22:05 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=425</guid>
		<description><![CDATA[I fixed a rather nasty bug today in AspectObjectiveC. One particular unit test would crash with EXC_BAD_ACCESS every time. After learning far more about registers and ABIs than I ever wanted to know (thanks, Greg Parker), it dawned on me that performSelector: was corrupting memory. It was particularly hard to track down because the crash [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/why-performselector-is-more-dangerous-than-i-thought/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Video: AspectObjectiveC In Five Minutes</title>
		<link>http://www.tomdalling.com/blog/cocoa/video-aspectobjectivec-in-five-minutes</link>
		<comments>http://www.tomdalling.com/blog/cocoa/video-aspectobjectivec-in-five-minutes#comments</comments>
		<pubDate>Sat, 20 Mar 2010 16:17:26 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=392</guid>
		<description><![CDATA[Here&#8217;s a quick video about AspectObjectiveC, and what it can do. The code is available from github. I should also mention that AspectObjectiveC isn&#8217;t ready for release just yet.]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/video-aspectobjectivec-in-five-minutes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Side Project: AspectObjectiveC</title>
		<link>http://www.tomdalling.com/blog/cocoa/side-project-aspectobjectivec</link>
		<comments>http://www.tomdalling.com/blog/cocoa/side-project-aspectobjectivec#comments</comments>
		<pubDate>Thu, 11 Mar 2010 15:49:39 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=388</guid>
		<description><![CDATA[I&#8217;ve started a new side project called AspectObjectiveC on github. It&#8217;s a little aspect-oriented programming framework for objective-c. In a nutshell, it allows you to run arbitrary code before, after, or instead of any method at runtime. You can modify arguments before they enter the method, modify the return value of the method, or completely [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/side-project-aspectobjectivec/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MD5 Hashes in Cocoa</title>
		<link>http://www.tomdalling.com/blog/cocoa/md5-hashes-in-cocoa</link>
		<comments>http://www.tomdalling.com/blog/cocoa/md5-hashes-in-cocoa#comments</comments>
		<pubDate>Thu, 24 Sep 2009 03:12:25 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.tomdalling.com/?p=175</guid>
		<description><![CDATA[Let&#8217;s jump straight into the code: #import &#60;CommonCrypto/CommonDigest.h&#62; &#160; NSString* MD5StringOfString&#40;NSString* inputStr&#41; &#123; NSData* inputData = &#91;inputStr dataUsingEncoding:NSUTF8StringEncoding&#93;; unsigned char outputData&#91;CC_MD5_DIGEST_LENGTH&#93;; CC_MD5&#40;&#91;inputData bytes&#93;, &#91;inputData length&#93;, outputData&#41;; &#160; NSMutableString* hashStr = &#91;NSMutableString string&#93;; int i = 0; for &#40;i = 0; i &#60; CC_MD5_DIGEST_LENGTH; ++i&#41; &#91;hashStr appendFormat:@&#34;%02x&#34;, outputData&#91;i&#93;&#93;; &#160; return hashStr; &#125; Now for the explanation. [...]]]></description>
		<wfw:commentRss>http://www.tomdalling.com/blog/cocoa/md5-hashes-in-cocoa/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

