<?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>Dave Verwer's Blog &#187; Cocoa Short</title>
	<atom:link href="http://blog.daveverwer.com/category/cocoa-short/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.daveverwer.com</link>
	<description>I write Mac and iPhone software.</description>
	<lastBuildDate>Thu, 15 Apr 2010 06:49:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone Game Scoreboard using Core Animation</title>
		<link>http://blog.daveverwer.com/iphone-development/iphone-game-scoreboard-using-core-animation/</link>
		<comments>http://blog.daveverwer.com/iphone-development/iphone-game-scoreboard-using-core-animation/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 12:51:23 +0000</pubDate>
		<dc:creator>Dave Verwer</dc:creator>
				<category><![CDATA[Cocoa Short]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[cabasicanimation]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[cocoa-touch]]></category>
		<category><![CDATA[core animation]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://blog.daveverwer.com/?p=73</guid>
		<description><![CDATA[I have been helping out recently with a project running between UCLAN and Lancaster University which involves two teams of students working together to create a couple of iPhone games.
Last week one of the teams raised a question about how to create a rolling score board and we worked through a couple of ideas with [...]]]></description>
			<content:encoded><![CDATA[<p>I have been helping out recently with a project running between <a href="http://www.uclan.ac.uk/">UCLAN</a> and <a href="http://www.lancs.ac.uk/">Lancaster University</a> which involves two teams of students working together to create a couple of iPhone games.</p>
<p>Last week one of the teams raised a question about how to create a rolling score board and we worked through a couple of ideas with some sample code but did not implement it fully. The idea stuck in my mind all week though and so in a little free time this morning I felt inspired to knock something together around it and this is what dropped out of Xcode at the end of it.</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/1Xfapl0pa94&amp;hl=en&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/1Xfapl0pa94&amp;hl=en&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>It has been implemented as a simple CALayer subclass that takes care of all of the management of the internal layers and animations and exposes a very simple interface to set the score value.</p>
<p>The images must be named 0.png through 9.png and included in the resources bundle but as long as you do that it should cope with any sized images as long as they are all the same size. The code can be found <a href="http://github.com/daveverwer/SDScoreBoard">on github</a>.</p>
<p><strong>UPDATE:</strong> Thanks to <a href="http://johnmckerrell.com/">John McKerrell</a> for the suggestion that to give a little more realism, digits should transition in from the bottom coming from a lower number and in from the top from a higher number. This needed a bit of a hack around the 0/9 boundary but I think the outcome is pretty good. This is how it looks.</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/kXvYgoL1Gbo&amp;hl=en&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/kXvYgoL1Gbo&amp;hl=en&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This was also a nice break from writing code on large projects, I have been really slacking on writing any code that isn&#8217;t going into a shipping codebase recently and so this was a very refreshing little break from the grind.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveverwer.com/iphone-development/iphone-game-scoreboard-using-core-animation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cocoa Short: UIScrollView quick tip</title>
		<link>http://blog.daveverwer.com/iphone-development/cocoa-short-uiscrollview-quick-tip/</link>
		<comments>http://blog.daveverwer.com/iphone-development/cocoa-short-uiscrollview-quick-tip/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 12:25:37 +0000</pubDate>
		<dc:creator>Dave Verwer</dc:creator>
				<category><![CDATA[Cocoa Short]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[cocoa-touch]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[uiscrollview]]></category>

		<guid isPermaLink="false">http://blog.daveverwer.com/?p=22</guid>
		<description><![CDATA[Just a quick iPhone development tip this morning, blogged because I found overcomplicated solutions when I googled it when what I actually wanted to do was really simple.
If you have a UIScrollView containing controls which need to respond to swipe/drag touches themselves rather than scroll the container then just set delayContentTouches to NO. Once this [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick iPhone development tip this morning, blogged because I found overcomplicated solutions when I googled it when what I actually wanted to do was really simple.</p>
<p>If you have a UIScrollView containing controls which need to respond to swipe/drag touches themselves rather than scroll the container then just set delayContentTouches to NO. Once this is done the default behaviour is then to immediately pass touches into any UIControl contained within the scroll view instead of scrolling.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveverwer.com/iphone-development/cocoa-short-uiscrollview-quick-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
