<?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>Jay Fuerstenberg - Development Blog</title>
	<atom:link href="http://jayfuerstenberg.com/devblog/feed" rel="self" type="application/rss+xml" />
	<link>http://jayfuerstenberg.com/devblog</link>
	<description>A playground for creative development</description>
	<lastBuildDate>Tue, 07 May 2013 20:23:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Free Status Orb Images for iOS Apps</title>
		<link>http://jayfuerstenberg.com/devblog/free-status-orb-images-for-ios-apps?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-status-orb-images-for-ios-apps</link>
		<comments>http://jayfuerstenberg.com/devblog/free-status-orb-images-for-ios-apps#comments</comments>
		<pubDate>Tue, 07 May 2013 12:50:10 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[inkscape]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=190</guid>
		<description><![CDATA[I&#8217;m currently wrapping up development of my next app for Mac, iPhone and iPad. One screen in this app uses green, red and gray status orb images to indicate the correctness of the user&#8217;s credentials for a particular online service. &#8230; <a href="http://jayfuerstenberg.com/devblog/free-status-orb-images-for-ios-apps">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m currently wrapping up development of my next app for Mac, iPhone and iPad.</p>
<p>One screen in this app uses green, red and gray status orb images to indicate the correctness of the user&#8217;s credentials for a particular online service.</p>
<p>For the OSX edition I was able to use the excellent NSImageNameStatusAvailable, NSImageNameStatusUnavailable and NSImageNameStatusNone status orbs that come pre-bundled with Cocoa and are intended for use with NSImage.</p>
<p>The iPhone and iPad editions of my app however could not avail themselves of these handy graphics and I had to create my own, which I now share with you for free.</p>
<p>I used Inkscape to create the below green, red and gray vectors (in SVG) from which I could export rasterized versions. The appearance is more or less keeping inline with the orbs in OSX but the files are originals.</p>
<p style="text-align: center;"><img title="status-orb-green.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2013/05/status-orb-green1.png" alt="Status orb green" width="16" height="17" border="0" /> <img title="status-orb-green@2x.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2013/05/status-orb-green@2x.png" alt="Status orb green 2x" width="32" height="33" border="0" /> <img title="status-orb-red.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2013/05/status-orb-red.png" alt="Status orb red" width="16" height="17" border="0" /> <img title="status-orb-red@2x.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2013/05/status-orb-red@2x.png" alt="Status orb red 2x" width="32" height="33" border="0" /> <img title="status-orb-gray.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2013/05/status-orb-gray.png" alt="Status orb gray" width="16" height="17" border="0" /> <img title="status-orb-gray@2x.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2013/05/status-orb-gray@2x.png" alt="Status orb gray 2x" width="32" height="33" border="0" /></p>
<p>The below file contains those SVG and PNG files in both Retina display and non-Retina display resolutions. <a href="http://www.jayfuerstenberg.com/oss/svg/status-orbs.zip" target="_blank">Download File</a></p>
<p>Feel free to use/modify these in your iOS projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/free-status-orb-images-for-ios-apps/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS UDID Officially Gone</title>
		<link>http://jayfuerstenberg.com/devblog/ios-udid-officially-gone?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ios-udid-officially-gone</link>
		<comments>http://jayfuerstenberg.com/devblog/ios-udid-officially-gone#comments</comments>
		<pubDate>Fri, 22 Mar 2013 12:18:13 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[udid]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=174</guid>
		<description><![CDATA[Today Apple announced that as of May 1st 2013 iOS applications retrieving UDIDs (Unique Device IDs) will be rejected prior to distribution. Previously the UIDevice class&#8217; uniqueIdentifier method used to obtain the UDID had only been deprecated. Apple now recommends &#8230; <a href="http://jayfuerstenberg.com/devblog/ios-udid-officially-gone">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today Apple <a href="https://developer.apple.com/news/?id=3212013a" target="_blank">announced</a> that as of May 1st 2013 iOS applications retrieving UDIDs (Unique Device IDs) will be rejected prior to distribution.</p>
<p>Previously the UIDevice class&#8217; uniqueIdentifier method used to obtain the UDID had only been deprecated.</p>
<p>Apple now recommends developers to use the UIDevice class&#8217; <a href="https://developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor" target="_blank">identifierForVendor</a> method which is available from iOS 6.0.</p>
<p>The returned value is unique to the device for all apps developed by a given software vendor.</p>
<p>This should replace the UDID quite well, while also preventing multiple vendors from working together to track users across apps.</p>
<p>If your app must remain compatible with iOS 5 or earlier this method will not be available and the workaround, as I wrote in an <a href="http://www.jayfuerstenberg.com/blog/overcoming-udid-deprecation-by-using-guids" target="_blank">earlier post</a>, is to access the device&#8217;s network MAC address which is also unique to the device.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/ios-udid-officially-gone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Make a Build Script for Bundling dylib Files into an OS X App</title>
		<link>http://jayfuerstenberg.com/devblog/how-to-make-a-build-script-for-bundling-dylib-files-into-an-os-x-app?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-make-a-build-script-for-bundling-dylib-files-into-an-os-x-app</link>
		<comments>http://jayfuerstenberg.com/devblog/how-to-make-a-build-script-for-bundling-dylib-files-into-an-os-x-app#comments</comments>
		<pubDate>Fri, 04 Jan 2013 06:10:26 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=168</guid>
		<description><![CDATA[Although I&#8217;m not new to Mac development I never needed to embed a dynamic library (.dylib file) into an app until just recently. Needless to say I struggled with this for a while.I also wasn&#8217;t able to locate any single, up &#8230; <a href="http://jayfuerstenberg.com/devblog/how-to-make-a-build-script-for-bundling-dylib-files-into-an-os-x-app">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Although I&#8217;m not new to Mac development I never needed to embed a dynamic library (.dylib file) into an app until just recently. Needless to say I struggled with this for a while.<br />I also wasn&#8217;t able to locate any single, up to date and reputable tutorial on the topic so I wanted to collect the bits and pieces I found into this single, easy to understand article so I could help others.</p>
<p>The strategy that worked for me, and which I&#8217;ll cover below, was to create a post-build script.</p>
<p> </p>
<p><strong>Understanding Dynamic Libraries</strong></p>
<p>Dynamic libraries have encoded within them a &#8220;name&#8221; which actually serves as a path by which they are located. In order for your already built app to reference a dynamic library it needs to know where to find it and during the build process this encoded name becomes that location. When your app starts up it attempts to load all its dependencies at their named paths and unless said dynamic library is installed on the user&#8217;s Mac the app will crash.</p>
<p>Of course you can never be 100% certain a user will have the dynamic library beforehand and installed at just the right location. It therefore makes more sense to bundle the library <em>within</em> your app.</p>
<p><strong>Determining the Encoded Name</strong></p>
<p>In your app&#8217;s main target create a post-build script and enter the commands below, replacing MyProject with the name of your project and the &#8220;ThirdParty/Abc/&#8221; with the path of the .dylib file relative to your project&#8217;s base path.</p>
<pre>echo OTOOL BEGIN\n<br />otool -L MyProject/ThirdParty/Abc/Abc.dylib\n<br />echo OTOOL END</pre>
<p>Now build your project and inspect the build log (Right click on any build issue and select the &#8220;Reveal in Log&#8221; menu item). The output from otool&#8217;s execution should appear below &#8220;OTOOL BEGIN&#8221; and above &#8220;OTOOL END&#8221;.</p>
<p>Did it work? Okay, now remove these 3 lines from your build script but keep the dynamic library&#8217;s name handy for the last step.</p>
<p> </p>
<p><strong>Overriding the Dynamic Library&#8217;s Encoded Name</strong></p>
<p>The below command overrides the dynamic library&#8217;s name to one that will match its path within your app&#8217;s folder (remember an OS X app is really an .app folder, not a file). Typically libraries appear under the &#8220;Frameworks&#8221; folder. NOTE: Make sure you have a &#8220;Copy Files&#8221; build phase which will copy the file from its source to this &#8220;Frameworks&#8221; folder by specifying it as the Destination.</p>
<pre>install_name_tool -id @executable_path/../Frameworks/Abc.dylib MyProject/ThirdParty/Abc/Abc.dylib</pre>
<p>NOTE: The executable path variable is the folder in which the true binary executable is located. Typically in the PRODUCT_NAME/Contents/MacOS folder. So the path @executable_path/../Frameworks/ is really PRODUCT_NAME.app/Contents/Frameworks.</p>
<p>In the above command replace Abc.dylib with your dynamic library&#8217;s filename.<br />Also replace MyProject with the name of your project.<br />In this example the source folder for the Abc.dylib is under &#8220;ThirdParty/Abc&#8221; and you&#8217;ll need to provide an appropriate path to your dylib file, following your project&#8217;s conventions.</p>
<p>Now that the dynamic library&#8217;s new encoded name matches the new location in the &#8220;Frameworks&#8221; folder the next step is to tell your app to expect it there.</p>
<p>Remember this is a post build step. Your app was originally linked against the not yet renamed dynamic library and thinks it needs to look for it there still. This is where we use the encoded name otool reported to us&#8230;</p>
<p> </p>
<p><strong>Modifying the App&#8217;s Reference to the Dynamic Library</strong></p>
<p>The below command changes the referred location of the dynamic library from its original path to its new one within the &#8220;Frameworks&#8221; folder.  Add it to the bottom of your script.</p>
<pre>install_name_tool -change usr/lib/Abc.dylib @executable_path/../Frameworks/Abc.dylib MyProject/ThirdParty/Abc/Abc.dylib</pre>
<p>As with the previous step, modify the paths to reflect those of your project and take special careful to type all paths accurately.  The above &#8220;usr/lib&#8221; path may differ from that of your dylib and this is why you used otool.  Take the path you discovered with that tool and if different from &#8220;usr/lib&#8221; replace it.</p>
<p>Run the build once more. If no errors occur and the dylib file is indeed bundled in the &#8220;Frameworks&#8221; folder (you can check by stripping the .app extension from the folder) there is one last thing to test. Running the app!</p>
<p><strong><br /></strong></p>
<p><strong>Run It</strong></p>
<p>Archive the project (Xcode menu Product → Archive). This will open the Organizer window. From here you can press the Distribute button which will prompt you for the method of distribution.<br />Choose &#8220;Export as Application&#8221; and export it to your desktop. The app is now waiting for you there and you only need to double click it. If the app starts up without complaint you&#8217;ve successfully bundled the dynamic library!</p>
<p>If the app doesn&#8217;t execute, check the error report OS X offers in the crash dialog to see what file path it expected to use. You can also reuse the otool command shown in the first step at the bottom of your build script to double check that the dynamic library was indeed renamed.  Most errors end up being mistyped paths and otool can prove so.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/how-to-make-a-build-script-for-bundling-dylib-files-into-an-os-x-app/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Draw Thick 2D Lines in OpenGL</title>
		<link>http://jayfuerstenberg.com/devblog/how-to-draw-thick-2d-lines-in-opengl?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-draw-thick-2d-lines-in-opengl</link>
		<comments>http://jayfuerstenberg.com/devblog/how-to-draw-thick-2d-lines-in-opengl#comments</comments>
		<pubDate>Wed, 21 Nov 2012 13:04:28 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[drawing]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[point]]></category>
		<category><![CDATA[quad]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=163</guid>
		<description><![CDATA[Background In a recent project I needed to draw lines NSBezierPath style in OpenGL at different widths and which may be zoomed arbitrarily by the user. As OpenGL does not natively support rounded end caps on lines drawn with glVertex2f I employed &#8230; <a href="http://jayfuerstenberg.com/devblog/how-to-draw-thick-2d-lines-in-opengl">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Background</strong></p>
<p>In a recent project I needed to draw lines NSBezierPath style in OpenGL at different widths and which may be zoomed arbitrarily by the user. As OpenGL does not natively support rounded end caps on lines drawn with glVertex2f I employed the popular technique of drawing a GL_POINT at both ends of a line using the same vertices as the line itself.</p>
<p>This approach works to a point but, I discovered, not on every machine.</p>
<p>On my development iMac the OpenGL implementation handled this without complaint, but when testing it on a different machine (a Mac mini) I noticed an odd effect.  The points I was using to simulate end caps were gigantic in comparison to the lines themselves and it resembled a narrow bone with large joints on both ends.</p>
<p>I investigated the cause by querying the GL_SMOOTH_LINE_WIDTH_RANGE and GL_SMOOTH_POINT_SIZE_RANGE parameter values.  It seems the points could range from 1.0 &#8211; 64.0 in size but the lines only 1.0 &#8211; 7.0 on this test machine. What I needed was a width of 20.0.</p>
<p>At this point it was clear that I would need to replace my native OpenGL lines with quad based pseudo-lines. Searching online for an existing implementation yielded nothing that fit my needs so I ended up rolling my own, which I now offer for free to everybody via<br />
my Github repository (<a href="https://github.com/jayfuerstenberg/JFCommon/blob/master/JFOpenGLUtil.h" target="_blank">JFOpenGLUtil.h</a>, <a href="https://github.com/jayfuerstenberg/JFCommon/blob/master/JFOpenGLUtil.m" target="_blank">JFOpenGLUtil.m</a>).</p>
<p><strong><br />
</strong></p>
<p><strong>How It Works</strong></p>
<p>The implementation is simple. A GL_QUAD is a 4-sided polygon consisting of 4 vertices and, if kept narrow, it can be made to resemble a line.  If we know the line width and the beginning and end points we&#8217;re ready. We only need to calculate one offset point from the beginning point.  This offset point is ½ the line width in a perpendicular angle from the line. Once this offset is determined it can be reused 4 times to render the quad.</p>
<p><strong><br />
</strong></p>
<p><strong>How To Use It</strong></p>
<p>Unlike glVertex2f, you&#8217;ll need to provide 2 points at once. This is because the angle (from the beginning to the end) is needed to determine the GL_QUAD vertices.  If you&#8217;re using a for loop to iterate over your points just skip the first point like this&#8230;</p>
<pre>Point *previousPoint = nil;
for (Point *point in pointArray) {

	CGPoint endRenderPoint = [point renderPoint];

	if (previousPoint != nil) {
		CGPoint beginRenderPoint = [previousPoint renderPoint];

		[JFOpenGLUtil drawQuadLineWithWidth: lineWidth
					red: redColor
					green: greenColor
					blue: blueColor
					from: beginRenderPoint
					to: endRenderPoint];
	}
	previousPoint = point;
}</pre>
<p>&nbsp;</p>
<p>With this approach lines of virtually any width can be supported.  But don&#8217;t forget, anti-aliasing is needed to keep the quad line from looking jagged of course.  I hope this implementation helps you if OpenGL has been less than cooperative with your app&#8217;s line drawing.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/how-to-draw-thick-2d-lines-in-opengl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Web Sharing Preference Pane Replacement For Mountain Lion</title>
		<link>http://jayfuerstenberg.com/devblog/free-web-sharing-preference-pane-replacement-for-mountain-lion?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-web-sharing-preference-pane-replacement-for-mountain-lion</link>
		<comments>http://jayfuerstenberg.com/devblog/free-web-sharing-preference-pane-replacement-for-mountain-lion#comments</comments>
		<pubDate>Sun, 29 Jul 2012 07:22:49 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=158</guid>
		<description><![CDATA[I previously wrote about how to restore your Sites folder that OS X 10.7 Lion no longer created by default. Today I discovered, and spent many hours trying to overcome another snag introduced by OS X 10.8 Mountain Lion.  It &#8230; <a href="http://jayfuerstenberg.com/devblog/free-web-sharing-preference-pane-replacement-for-mountain-lion">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://jayfuerstenberg.com/devblog/sites-folder-in-lion-missing" target="_blank">I previously wrote about how to restore your Sites folder</a> that OS X 10.7 Lion no longer created by default.</p>
<p>Today I discovered, and spent many hours trying to overcome another snag introduced by OS X 10.8 Mountain Lion.  It would seem that the &#8220;Web Sharing&#8221; Systems Preference is now completely removed.  In the end I stumbled upon a replacement Systems Preference pane which, if anything, is easier to use than the one Apple originally offered.</p>
<p><a href="http://clickontyler.com/blog/2012/02/web-sharing-mountain-lion/" target="_blank">http://clickontyler.com/blog/2012/02/web-sharing-mountain-lion/</a></p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="new-web-sharing.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/new-web-sharing.png" alt="New web sharing" width="600" height="410" border="0" /></p>
<p>There are no two ways about it, Apple is continuing to take actions to make OS X a more difficult OS upon which to develop websites.  Why I can only guess.  The automated approach Apple offered earlier eliminated any potential for errors which is exactly what I got myself into today by not properly creating the per-user Apache configuration extension file.  OS X is supposed to be the gentler Unix and this move is confusing.  At this rate I expect OS X 10.9 to not even have Apache installed.</p>
<p>Today&#8217;s saviors are the fine people at ClickOnTyler whose new preference pane brings back that one click automation.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/free-web-sharing-preference-pane-replacement-for-mountain-lion/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS Icon Drop Shadow Tutorial</title>
		<link>http://jayfuerstenberg.com/devblog/ios-icon-drop-shadow-tutorial?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ios-icon-drop-shadow-tutorial</link>
		<comments>http://jayfuerstenberg.com/devblog/ios-icon-drop-shadow-tutorial#comments</comments>
		<pubDate>Wed, 11 Jul 2012 13:14:27 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=153</guid>
		<description><![CDATA[In the &#8220;About&#8221; screen of each of my apps I display the app&#8217;s icon with a nice drop shadow under it to give the icon that tangible feeling. Today I thought I&#8217;d share the technique I use to achieve this &#8230; <a href="http://jayfuerstenberg.com/devblog/ios-icon-drop-shadow-tutorial">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In the &#8220;About&#8221; screen of each of my apps I display the app&#8217;s icon with a nice drop shadow under it to give the icon that tangible feeling.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="icon-with-drop-shadow.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/icon-with-drop-shadow.png" alt="Icon with drop shadow" width="320" height="248" border="0" /></p>
<p>Today I thought I&#8217;d share the technique I use to achieve this effect.</p>
<p>In your project, add the QuartzCore framework to your main target. You&#8217;ll need this to help you reference your icon view&#8217;s layer property (<a href="http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CALayer_class/Introduction/Introduction.html#//apple_ref/doc/c_ref/CALayer" target="_blank">CALayer</a>) which is responsible for rendering the drop shadow.</p>
<p>Once you&#8217;ve done that add the shadow effects you see in my code below to your icon initialization logic&#8230;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="ios-icon-drop-shadow.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/ios-icon-drop-shadow.png" alt="iOS Icon Drop Shadow" width="506" height="285" border="0" /></p>
<p>Some items to note about the above sample:</p>
<ul>
<li>The shadow color is a translucent black.</li>
<li>The shadow is 2 points lower than the icon and has a 2 point radius.</li>
<li>Clipping to bounds is turned off so the shadow is not clipped off.</li>
</ul>
<p>I encourage you to experiment with these settings to find the right look for your icon or image.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/ios-icon-drop-shadow-tutorial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Professional Layouts in OS X and iOS &#8211; Open Source View Position Utility</title>
		<link>http://jayfuerstenberg.com/devblog/professional-layouts-in-os-x-and-ios-open-source-view-position-utility?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=professional-layouts-in-os-x-and-ios-open-source-view-position-utility</link>
		<comments>http://jayfuerstenberg.com/devblog/professional-layouts-in-os-x-and-ios-open-source-view-position-utility#comments</comments>
		<pubDate>Sun, 08 Jul 2012 07:24:06 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=147</guid>
		<description><![CDATA[Introducing JFViewPositionUtil I created JFViewPositionUtil for KEYBOX 2.0. I hand code my interfaces rather than use Interface Builder, and version 1.0 proved extremely difficult to lay out professionally while also balancing the consideration of localization. Why would anybody in their &#8230; <a href="http://jayfuerstenberg.com/devblog/professional-layouts-in-os-x-and-ios-open-source-view-position-utility">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Introducing JFViewPositionUtil</strong></p>
<p>I created <a href="https://github.com/jayfuerstenberg/JFCommon/commit/b9e5037fde0de9fdb014ba832b4d1209a45a48b4" target="_blank">JFViewPositionUtil</a> for KEYBOX 2.0. I hand code my interfaces rather than use Interface Builder, and version 1.0 proved extremely difficult to lay out professionally while also balancing the consideration of localization.</p>
<p>Why would anybody in their right mind NOT use Interface Builder? Don&#8217;t get me wrong, it&#8217;s a fine tool but for the degree of customization I and many developers require it doesn&#8217;t quite cut it.</p>
<p>In the case of KEYBOX 1.0, a layout that would look good in English might make Japanese look awful. My initial approach to handle this was to adjust the font size on a per-language basis. It worked but was nowhere near optimal.</p>
<p>In version 2.0 I resolved to fix this and since its release I&#8217;ve used this class in all my products. It&#8217;s matured to the point where I believe it to be beneficial to others as well, and to this end I&#8217;ve decided to open source it.</p>
<p><strong><br />
</strong></p>
<p><strong>Class Design</strong></p>
<p>I designed this class to be goal oriented. That is, whatever your goal, you typically only need to invoke a single method offered by this class. It&#8217;s even a singleton so there is no need to instantiate it.</p>
<p>This utility class works with both OS X and iOS projects but it should be noted that it is designed to work in coordinate systems where the point of origin (0, 0) is the top left corner. In other words, you&#8217;ll want to flip your views in OS X projects when using this class.</p>
<p><strong>Lazy-initialization of views</strong></p>
<p>A quick note, since this utility class operates mainly on the notion of positioning views relative to others, it is beneficial to adopt a lazy-initialization approach to view creation. This way sibling views upon which your view depends will be initialized and positioned by the time you need to base your view&#8217;s position on them. All of the below examples in this post will use lazy-initialization of UIViews for iOS.</p>
<p><strong><br />
</strong></p>
<p><strong>Common Layouts</strong></p>
<p>The best way to demonstrate this class&#8217; abilities is to simply show you. Since this class is goal oriented I&#8217;ll break things down by common layout goals.</p>
<p>■ Label to the right of an icon<br />
This is a common layout pattern, and the code might look something like this&#8230;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="label-right-of-icon.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/label-right-of-icon.png" alt="Label right of icon" width="381" height="190" border="0" /></p>
<p>One variation of this is the case of a multiline label. You probably wouldn&#8217;t want to vertically center your label to the right of your icon. Instead, it might look more professional to snap the icon&#8217;s top right anchor point 5 points left of the label&#8217;s top left point. I&#8217;ll discuss this technique a bit later.</p>
<p>■ Center aligned titles/headers</p>
<p>Sounds simple enough right? The title is a label with a bold font. Here&#8217;s the code&#8230;<br />
<img style="display: block; margin-left: auto; margin-right: auto;" title="centered-header.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/centered-header.png" alt="Centered Header" width="429" height="188" border="0" /></p>
<p><em>It&#8217;s generally a good idea to first call sizeToFit on labels prior to aligning them with JFViewPositionUtil, especially when you intend to center align them.</em></p>
<p>■ Text field under a label</p>
<p>Have a text field that should appear left aligned, say, 10 points under a label explaining its purpose? Here is how to accomplish this&#8230;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="left-aligned-textfield.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/left-aligned-textfield.png" alt="Left Aligned Textfield" width="427" height="176" border="0" /></p>
<p>And to right align it instead&#8230;<br />
<img style="display: block; margin-left: auto; margin-right: auto;" title="right-aligned-textfield.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/right-aligned-textfield.png" alt="Right Aligned Textfield" width="430" height="176" border="0" /></p>
<p>This just touches upon some of the high-level functionality of this class.  Other useful methods exist, each aptly named for its purpose.</p>
<p><strong>Going Beyond</strong></p>
<p>If JFViewPositionUtil&#8217;s high levels actions don&#8217;t suffice its low-level anchoring system will. The code is based on anchoring points (shown below) at the cardinal points on a rectangle as well as a center point and allow for snapping of any anchor point of one view to any point of another while also allowing for offsets from this snap point for pixel-perfect precision.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="anchor-names.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/anchor-names.png" alt="Anchor Names" width="400" height="315" border="0" /></p>
<p>Earlier I mentioned aligning a multilined label&#8217;s top left corner 5 points to the right of an icon&#8217;s top right corner. Here is how to accomplish this&#8230;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="multilined-label.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/07/multilined-label.png" alt="Multilined Label" width="600" height="205" border="0" /></p>
<p>Notice that I&#8217;m aligning the label to the icon. You could just as easily do the reverse.</p>
<p><strong><br />
</strong></p>
<p><strong>Going Even Further</strong></p>
<p>JFViewPositionUtil&#8217;s high and low-level methods ought to satisfy all your view positioning needs, but if your app has some specialized effect that isn&#8217;t handled you might also find the <strong>pointForAnchorPoint:ofView:</strong> method useful. It retrieves the location (relative to the parent view) of any of the subview&#8217;s anchor points. Armed with this information you can create your own frames to position views just the way you want.</p>
<p><strong>Grouped Layout Strategy</strong></p>
<p>With this introduction to the class&#8217; capabilities out of the way it&#8217;s now time to talk layout strategies.</p>
<p>While there is nothing wrong with laying out each control in relation to a sibling control it often makes sense to group controls within an otherwise invisible NSView/UIView and adjust the size of that parent view perfectly for the subviews it contains.</p>
<p>Why would you want to do this? This approach allows for a group view to be dynamically slid in between two others and to have them adjust their positions to accommodate it. Having to re-adjust dozens of controls in tandem is a lot harder than re-adjusting a single group view acting as the parent view for these controls.</p>
<p>JFViewPositionUtil offers the <strong>setHeightOfSuperview:toFitAllSubviewsWithMargin:</strong> method to help you in this regard. Think of this method as being like the UIView sizeToFit method except that it allows for an adjustable margin on the bottom of the lowest subview.</p>
<p>This method is also quite useful for adjusting the vertical height of UIScrollViews, even if you don&#8217;t plan to dynamically insert or remove group views within them. The logic has a special handler for UIScrollViews to set their content size in addition to their regular view size.</p>
<p>One last thing to note: The lazy-initialization approach I advocated earlier comes into play again here. Keep in mind that the group view needs to ensure that all its subviews are initialized and positioned prior to adjusting its own size to fit them. By going with lazy-initialization the group view doesn&#8217;t need to worry about the possibility of re-initializing its subviews.</p>
<p><strong>Localization Concerns</strong></p>
<p>As I mentioned earlier it was when I was localizing KEYBOX that I encountered difficulty with laying out my views. Japanese is a very compact language whereas French and Spanish are comparatively stretched out. English is somewhere in the middle.</p>
<p>The approach I took in version 2.0 was to use fixed size font, multilined labels to handle any text length and have any sibling controls appearing under them dynamically adjust their y positions to always be N points away. As long as the parent view had enough vertical room or was UIScrollView-based it worked like magic.</p>
<p><strong><br />
</strong></p>
<p><strong>Animated Views</strong></p>
<p>In case you were wondering, this class is also compatible with the animation systems of both OS X and iOS. Simply use JFViewPositionUtil to set the new position within an animation context and watch iOS do the rest for you.  For OS X you can use a view&#8217;s animator for the same effect or directly reset the view position at each progress step of an NSAnimation if need be.</p>
<p>Lastly, if you are developing an OS X project and use auto-resizing views (setAutoResizingMask:) you&#8217;ll be happy to know that they are completely supported as usual in much the same manner as animated views are.</p>
<p><strong><br />
</strong></p>
<p><strong>In Closing</strong></p>
<p>JFViewPositionUtil is the result of my own frustrations with dynamic, hand-coded views.  If you are equally frustrated with the difficulties of having to code your UI by hand but simply cannot rely on Interface Builder to meet your exacting needs JFViewPositionUtil might be the sweet spot for you. <a href="https://github.com/jayfuerstenberg/JFCommon/commit/b9e5037fde0de9fdb014ba832b4d1209a45a48b4" target="_blank">I invite you to give it a try and find out for yourself!</a></p>
<p>If you have any questions or comments please contact me at jay [AT] this domain.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/professional-layouts-in-os-x-and-ios-open-source-view-position-utility/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I made this! &#8211; Rethinking Code Ownership</title>
		<link>http://jayfuerstenberg.com/devblog/i-made-this-rethinking-code-ownership?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-made-this-rethinking-code-ownership</link>
		<comments>http://jayfuerstenberg.com/devblog/i-made-this-rethinking-code-ownership#comments</comments>
		<pubDate>Wed, 04 Jul 2012 15:04:15 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[methodology]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=136</guid>
		<description><![CDATA[Except in more complex arrangements involving freelancers/contract workers the code that developers create obviously belongs to the company. When we talk about code ownership, we imply the knowledge to maintain that code. Code can be a very brittle thing and &#8230; <a href="http://jayfuerstenberg.com/devblog/i-made-this-rethinking-code-ownership">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Except in more complex arrangements involving freelancers/contract workers the code that developers create obviously belongs to the company. When we talk about code ownership, we imply the knowledge to maintain that code. Code can be a very brittle thing and the developer who created it may be the only person who understands the background of why the code is the way it is.</p>
<p>I&#8217;ve been fortunate to have worked in many projects which took various approaches to code ownership. In fact I&#8217;ve witnessed both extremes of the spectrum and various points in between.  The result?  I&#8217;ve come to the inescapable conclusion that code ownership is not only a good thing overall, but that it really ought be an unalienable right for developers. I&#8217;m ordinarily open-minded and don&#8217;t consider myself a purist on most matters but this might be an exception.</p>
<p>The reason is simple, as in all things, <strong>when a person&#8217;s name is attached to a thing, more care will put into its making.</strong></p>
<p>I&#8217;ve been developing professionally now for over 15 years. Long before movements like XP, TDD and Agile Development became buzzwords. These movements have introduced or at least popularized certain beneficial techniques but also some just plain bad ideas like backseat driving as a productivity booster and the topic of this post, code ownership or rather the movement against it.  As I said above I&#8217;m generally not a purist so I prefer to handle each problem on a case-by-case basis and not handcuff myself with artificial restrictions.</p>
<p>I could write a treatise about how religiousness has taken over the profession of development but in this article I just want to discuss the rationale behind the movement against code ownership and why I think it misses the point.  So without further ado&#8230;</p>
<p> </p>
<p><strong>Flight Risk</strong></p>
<p>The biggest crux of code ownership is that of flight risk. What if the owner of a piece of code quits and takes his knowledge with him? What if he uses his knowledge as leverage to force a raise/promotion out of us? What if this? What if that?</p>
<p>There are a lot of &#8220;what if?&#8221;s out there. These scenarios could indeed play out but one thing that isn&#8217;t a &#8220;what if?&#8221; is that less experienced developers are going to make bugs and continue making bugs until they learn to fix them.</p>
<p>To counteract this possibility of flight risk it was proposed that total ownership of code be abolished. In its place various approaches have arisen&#8230;</p>
<ul>
<li>100% shared code. Everybody owns everything/nothing. If a bug is found anybody can fix it. If the code isn&#8217;t clean, anybody can go in and clean it etc&#8230; If anybody quits it shouldn&#8217;t impact the company at all, in theory. The only problem with this approach is it doesn&#8217;t work. Development is a complex endeavor and it&#8217;s simply not possible to know everything. It&#8217;s more often the care that developers will be fixing code they&#8217;ve never seen before let alone understand.</li>
<li>Team ownership. A project&#8217;s code is owned by the team. If one member of the team quits the others will pull up the slack. While not perfect, this is a more balanced approach. You don&#8217;t need to know everything, just the projects in which you participated.</li>
</ul>
<p>It&#8217;s true that developers can pull up stakes and leave a company at any time (they aren&#8217;t slaves). If he or she has all the knowledge about a piece of code then that will be lost. <strong>Or will it?</strong></p>
<p><strong></strong>Assuming the code remains, if a compiler can understand it well enough to carry out the instructions within, certainly a developer with some time can do the same. I&#8217;ve often inherited such code with little to no documentation. It takes time but not all is lost.</p>
<p> </p>
<p><strong>Going in Reverse &#8211; Keeping Developers Around</strong></p>
<p>All other factors being equal, the more a person&#8217;s name appears in code the less likely that person is to leave the company. <strong>Developers are builders and we take pride in the things we build.</strong> We indeed become attached to them. That attachment, if it&#8217;s a positive one at least, can very well anchor us down.  And it&#8217;s a compounding effect!</p>
<p>80% of development is maintaining and extending existing code and the longer we work on a thing and the more code we own the harder it is to just leave it.  By abolishing code ownership you are actually discouraging this attachment from occurring and are arguably giving little reason for developers to stick around.</p>
<p>You might ask &#8220;Isn&#8217;t the attachment to the delivered project enough?&#8221;  The answer is &#8220;no&#8221;.  Attachments aren&#8217;t binary, they&#8217;re degrees, and the more there are the better.</p>
<p>If you fear that your developers will up and leave at any time you may have the much larger problem of a crummy work environment. Any great place to work will inspire people to stay.</p>
<p> </p>
<p><strong>Code Ownership = Code Accountability</strong></p>
<p>One of the best properties of code ownership is that it allows the code to develop the developer. If I make a mistake (it&#8217;s been known to happen) and I&#8217;m tasked with fixing it myself I&#8217;m going to learn from the mistake and the likelihood of me repeating it in the future will diminish if not drop to zero entirely.</p>
<p>Remember, bugs don&#8217;t come into existence by themselves, it is we developers who put them there in the first place. Of course we didn&#8217;t do it on purpose, they were put there as a consequence of us not understanding all the circumstances in which our code would run. It follows that one of the best ways to prevent bugs is to learn from them by fixing them.</p>
<p>The alternative, is to have somebody else fix my mistakes in which case I might not learn much if anything. Adding insult to injury, the developer who fixes my bug has now been burdened by me and with each such occurrence will hold me in lower and lower esteem.</p>
<p>Personally, I would prefer to be held accountable for my successes and my mistakes.</p>
<p><strong><br /></strong></p>
<p><strong>Fixing other People&#8217;s Code</strong></p>
<p>Ask any developer if he or she enjoys fixing other people&#8217;s code. I guarantee you that you&#8217;ll be given a resounding &#8220;NO&#8221;. I hate it too. It often feels unfair.</p>
<p>Over my many years of developing I&#8217;ve settled upon patterns that have proven themselves capable of creating robust code. I&#8217;m not perfect of course but I don&#8217;t leave a mess everywhere for others to clean up. I see it as an issue of discipline and <strong>I just don&#8217;t want to be a dick to others</strong>.</p>
<p>The fact is, in the same sense that you can&#8217;t become a programmer simply by reading a programming book you can&#8217;t learn from your mistakes if somebody fixes them for you and just tells you where you went wrong. You have to fix bugs to learn how to prevent them. I&#8217;ve fixed my share and I&#8217;m a better developer because of it.</p>
<p> </p>
<p><strong>Personal Projects</strong></p>
<p>My most robust code is in my personal projects. If it wasn&#8217;t I&#8217;d be inundated with bug reports, which I cannot afford to deal with. I own not only the knowledge but the very code itself. Unless I open source all my code nobody will fix my mistakes for me so that code has to be the best.</p>
<p>Each developer is of course different but I suspect those who truly care about quality share the same experiences as myself in this regard.</p>
<p>Even developers who work in an environment where code ownership is considered evil should at least pursue their own personal projects during their off time and see for themselves which approach works best.</p>
<p>It might just give us cause to rethink code ownership.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/i-made-this-rethinking-code-ownership/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Judging an App by its Cover &#8211; Techniques and Tools for Creating and Testing a Professional App Icon</title>
		<link>http://jayfuerstenberg.com/devblog/judging-an-app-by-its-cover-techniques-and-tools-for-creating-and-testing-a-professional-app-icon?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=judging-an-app-by-its-cover-techniques-and-tools-for-creating-and-testing-a-professional-app-icon</link>
		<comments>http://jayfuerstenberg.com/devblog/judging-an-app-by-its-cover-techniques-and-tools-for-creating-and-testing-a-professional-app-icon#comments</comments>
		<pubDate>Sun, 17 Jun 2012 08:32:04 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[app store]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[inkscape]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[keybox]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=115</guid>
		<description><![CDATA[When I redesigned the KEYBOX icon for version 2.2, I promised to write about the icon design approach I took. It&#8217;s taken me some time to get around to it but here it is. In this post I want to &#8230; <a href="http://jayfuerstenberg.com/devblog/judging-an-app-by-its-cover-techniques-and-tools-for-creating-and-testing-a-professional-app-icon">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>When I redesigned the KEYBOX icon for version 2.2, I promised to write about the icon design approach I took. It&#8217;s taken me some time to get around to it but here it is. In this post I want to talk about optimizing your app icon so that it has greater visual impact in the App Store. This is not an article showcasing a handful of awesome icons, there are already plenty of those.</p>
<p><strong>The Basics</strong></p>
<p>Most sales of iPhone apps are made via the App Store app present on each iPhone. When designing your app&#8217;s icon, how it will appear in this store is of utmost importance and as you can see from the image below, there are four important elements that introduce your app to the world&#8230;</p>
<ol>
<li>Icon</li>
<li>App Name</li>
<li>Price</li>
<li>Review count and rating</li>
</ol>
<div><img style="display: block; margin-left: auto; margin-right: auto;" title="app-slot.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/06/app-slot1.png" alt="App Slot" width="320" height="71" border="0" /></div>
<p>&nbsp;</p>
<p>People are visual by nature. Our eyes are drawn naturally to images and shapes.</p>
<p>When an iPhone user is quickly scrolling through a list of apps in the App Store, an icon that grabs the user&#8217;s attention may be the only thing preventing the remaining three elements and most importantly your app&#8217;s detail screen from being overlooked.</p>
<p>&nbsp;</p>
<p><strong>Before &amp; After</strong></p>
<p>The old KEYBOX icon is an example of how not to design an icon. It was my first attempt at iOS app icon design and, admittedly, a bad one at that. As you can see from the below image, it was flat and almost the same color as the App Store background. It&#8217;s almost as if it were hiding from the iPhone user and in retrospect it&#8217;s a miracle KEYBOX sold any units at all prior to the icon redesign.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="old-keybox-icon.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/06/old-keybox-icon1.png" alt="Old KEYBOX Icon" width="256" height="256" border="0" /></p>
<p>Below is the new KEYBOX icon.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="new-keybox-icon.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/06/new-keybox-icon1.png" alt="New KEYBOX Icon" width="256" height="256" border="0" /></p>
<p>I&#8217;m not claiming that it&#8217;s the most impressive icon out there but it&#8217;s a far cry from the original. I wanted to retain the spirit of the original icon (a secure place to safeguard your secrets) while also communicating how advanced KEYBOX actually is. Even though the image of a safety deposit box is familiar and trusted it was beginning to feel…. well, old.</p>
<p>The new icon keeps the signature keyhole (which has been there since the J2ME version back in 2005), and adds a foggy glass window through which we can just barely make out the many secrets represented by colored lights. The exterior of the box appears sturdy and the orange lit lock lamp communicates the box&#8217;s locked state. The grooved black panel rising slightly above the white box denotes that it is where the user unlocks the box. I could go on forever but what I&#8217;m getting at is the detail this icon now offers gives it a tangible feel and almost looks as if it could be plucked right out of the screen.</p>
<p>&nbsp;</p>
<p><strong>Real Testing</strong></p>
<p>As you might have already guessed, <strong>when I redesigned the new KEYBOX icon I wanted to be sure it stood out from not only crowd but also the App Store itself.</strong> The most important advice I can offer in this post is this: From day one, understand how icons (not just your own) will appear in the App Store.</p>
<p>To demonstrate what I mean, the iPhone App Store (the native app, not the browser-based iTunes app page) offers two background colors, dark gray (#98989C) and light gray (#ADADB0). On the left, right and bottom sides of the icon is a drop shadow. Below is a blown-up image of the KEYBOX icon as it appears in the App Store. Compare it to the icon above and note the drop shadow on both sides and below the icon.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="drop-shadow-blown-up.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/06/drop-shadow-blown-up1.png" alt="Drop Shadow Blown Up" width="365" height="365" border="0" /></p>
<p>Since translucency isn&#8217;t supported, you&#8217;ll need to emphasize your icon&#8217;s false sense of depth (the object casting the shadow) along these edges if you want a professional look.</p>
<p>&nbsp;</p>
<p><strong>Overcoming The Unnatural Icon</strong></p>
<p>It should be obvious that an icon which doesn&#8217;t populate the bottom, left and right sides will look unnatural. We are forced to fill up those boundaries. I know I said this article wouldn&#8217;t be about existing examples of great looking icons but I just want to link to <a href="http://www.mobileinc.co.uk/2012/05/the-art-of-the-ios-icon/" target="_blank">some creative icons</a> that took this forced shape constraint and made something delightful with it. The lesson is let this constraint push you to be creative.</p>
<p>&nbsp;</p>
<p><strong>Porting Considerations</strong></p>
<p>At some point you may want to port your app to the Mac, to Windows or maybe even to Android. At the time of this writing, iOS is the only platform that forces the rounded rectangle shape on us. If you&#8217;re porting your app away from iOS you&#8217;ll no longer be constrained this way. However offering the identical icon on a different platform can provide instant recognition with users already familiar with your iOS app so there is some merit in keeping the icon identical.</p>
<p>&nbsp;</p>
<p><strong>Standing Out</strong></p>
<p>It goes without saying that you want people to notice your app. Once you have ensured that your icon fits well in the App Store you can now concern yourself with competing with other apps for attention. Below are some techniques other apps are already using. Your app icon should also follow suit.</p>
<ol>
<li>Using the drop shadow to provide depth.</li>
<li>Using contrasting colors.</li>
<li>Use alarming colors like red and yellow if appropriate.</li>
<li>Using gradients to provide a sense of texture.</li>
</ol>
<p>Below I&#8217;ll examine each of these techniques in detail&#8230;</p>
<p>&nbsp;</p>
<p><strong>Depth</strong></p>
<p>As I mentioned earlier, people are visual and react to shapes and images. Objects that cast shadows appear to stand out. Since Apple renders a drop shadow under each icon we should use it by adhering to the rounded rectangle shape. The one element to be careful of is that this drop shadow also forces us to apply the correct lighting upon the object that is casting that drop shadow (from above, obviously). The only exception is when an icon is intended to be a flat window into a scene.</p>
<p>Another lesser used depth technique is the sink-into-screen icon.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="sunken-depth.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/06/sunken-depth1.png" alt="Sunken Depth Icons" width="345" height="131" border="0" /></p>
<p>Apple&#8217;s Photo Booth and Newsstand apps are excellent examples of this. Rather than protrude out of the screen towards the user they sink into it. The Photo Booth icon cleverly uses a border to create a small booth/room and shows the floor to give a sense that it can be walked into. The Newsstand icon appears as the typical magazine stand one might find in a street kiosk. The only caveat with this approach is that it leaves less room for the objects within the sunken space. Lastly, a sense of depth can be achieved by casting inner shadows. KEYBOX&#8217;s black panel casts two such shadows onto the white box to which it is attached.</p>
<p><strong>The worst way to destroy the sense of depth is to opt for Apple&#8217;s default glossy effects.  This effect encases your app icon in an chiclet-like button.</strong>  To turn this off, select &#8220;Prerendered&#8221; in the project&#8217;s Target Summary Window (near App Icons).  If you&#8217;re using a version of Xcode that doesn&#8217;t support this try setting the &#8220;UIPrerenderedIcon&#8221; preference to YES in Target Properties.</p>
<p>&nbsp;</p>
<p><strong>Contrasting Colors</strong></p>
<p>The human eye is driven to contrasting colors. One of the best app icons※ to demonstrate this is the ever popular <a href="http://itunes.apple.com/us/app/temple-run/id420009108?mt=8" target="_blank">Temple Run</a> by <a href="http://www.imangistudios.com/" target="_blank">Imangi Studios</a>. Its use of yellow and black helps it both stand out from the App Store&#8217;s gray background as well as pull the eyes of any iPhone user to it. Even if the game is not of interest to the user this icon simply cannot be ignored.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" title="App_TempleRun128.png" src="http://jayfuerstenberg.com/devblog/wp-content/uploads/2012/06/App_TempleRun128.png" alt="Temple Run App Icon" width="135" height="135" border="0" /></p>
<p>KEYBOX&#8217;s new icon also employs a contrast of white and black. The white contrasts with the App Store&#8217;s gray background and the black contrasts with the white.</p>
<p>&nbsp;</p>
<p><strong>Alarming Colors</strong></p>
<p>Color psychology teaches us that some colors induce a sense of alarm in people. Red and yellow indicate spiciness, high temperature, danger, and even anger. Adding a white halo around these colors can amplify their effects. The topic of color psychology is too deep for this post but it is worth studying the effects certain colors have on a target audience and whether those effects are appropriate.</p>
<p>&nbsp;</p>
<p><strong>Gradients</strong></p>
<p>In reality, your app&#8217;s icon is a flat array of pixels. To provide the illusion that objects in your icon are tangible use gradients. They trick the eye into believing that light is refracting off surfaces at different angles, angles that should only be possible if the object itself were not flat. Take the aforementioned Photo Book icon&#8217;s red curtain. It appears to ripple but of course this is just an illusion.</p>
<p>&nbsp;</p>
<p><strong>The Tools &amp; Techniques</strong></p>
<p>We&#8217;ve discussed theory long enough. Now for some tools and techniques.</p>
<p>As you are probably aware, the App Store requires that you prepare your icon in a variety of resolutions&#8230;</p>
<ul>
<li>57&#215;57 for non Retina display iPhones</li>
<li>114&#215;114 for Retina display iPhones and iPod touches</li>
<li>512&#215;512 for the App Store (will be resized at display time to a smaller size)</li>
</ul>
<p>Obviously you won&#8217;t make the same icon 3 times but will instead resize it to each of these resolutions. Some people dabble only in raster graphics for this but I prefer vector graphics perfectly rasterized at the end to the right size.</p>
<p>I might be the only developer who isn&#8217;t using Photoshop / Illustrator to create app icons. I like to support Indie Developers and I&#8217;m an <a href="http://flyingmeat.com/acorn/" target="_blank">Acorn</a> user. As for my vector graphics needs I discovered <a href="http://inkscape.org/" target="_blank">Inkscape</a> and SVG years ago and never looked back. Inkscape is originally intended for Linux and on the Mac it has to run as an X11 application. This leaves a lot to be desired in terms of look and feel but it is a very capable SVG editor and gives me numerical precision over all my icons&#8217; elements.</p>
<p>If you don&#8217;t spend much time doing graphics editing and don&#8217;t feel justified in forking over the amount of cash to buy Illustrator check out Inkscape. If you&#8217;re already in possession of Adobe software or any other software capable of the job by all means go with what you have.</p>
<p>I&#8217;ve prepared an <a href="http://www.jayfuerstenberg.com/oss/svg/app-icon-template.svg" target="_blank">Icon Template SVG file</a> in Inkscape that provides the dimensions and rectangle rounded corners just the way Apple likes them. You can use this as a container for your icon and to export the various raster graphics at their respective resolutions. If you inspect the SVG XML you&#8217;ll find the exportable area to use with the &#8220;Export Bitmap&#8221; function. In this file I used a 512&#215;512 rectangle with rounded corners (rx and ry set to 70.0).</p>
<p>&nbsp;</p>
<p><strong>A Modeling Contest</strong></p>
<p>My approach for judging the visual appeal of my app icons is much akin to a modeling contest. Up until now I&#8217;ve made it sound as if creating an optimized app icon is down to a science. Nothing could be further from the truth. As if tweaking this or that element in isolation would eventually yield the perfect icon. Models in a beauty pageant are not judged in isolation, they are judged in tandem against one another, and so must our app icons!</p>
<p>The steps described below put you in charge of a modeling contest, for icons!</p>
<ol>
<li>Scour the iPhone&#8217;s App Store and take full 640&#215;960 screenshots of screens with the most attractive icons you encounter.</li>
<li>Of all these icons pick what you consider to be the best four. Any given App Store screen can only display five apps so yours will be the fifth competing for eye-balls against these four.</li>
<li>Using Acorn, Pixelmator or any other graphics editor create a 640&#215;705 image within which you&#8217;ll drop each 640&#215;141 app slot.</li>
<li>Place your app icon in the middle slot. If your app is not already available in the App Store you&#8217;ll need to get creative and override another app&#8217;s slot with your icon. Don&#8217;t worry about the app name or other text, we&#8217;re just concerned with the icon for the time being.</li>
<li>Walk away from your Mac for at least 15 minutes and come back to gain a fresh and unbiased view. <strong>Remember, you want to see what App Store patrons who are otherwise indifferent to your app will see.</strong></li>
<li>Judge which icon is the most attractive.</li>
</ol>
<p>At the end of this process, if your app icon doesn&#8217;t even come close to contending identify why that is not the case. From there, decide what actions to take in order to close the gap.</p>
<p>I&#8217;d love to provide you with a template full of beautiful icons against which you could compare your own but I don&#8217;t own the rights to those icons. I can only provide you with these instructions for creating your own template.</p>
<p><strong>In Closing</strong></p>
<p>Creating an app is no small task and takes weeks if not months from beginning to release. Regardless if you are selling your app or giving it away for free you want to get it into people&#8217;s hands and everyday it is getting harder to gain the awareness needed to accomplish this. Your app&#8217;s icon is the gateway to impressing potential users and you owe it to yourself to put as much effort into it as you did your app.</p>
<p>Speaking personally, KEYBOX&#8217;s sales have more than doubled in response to the new icon design. I wish I knew what I know now when I first released it. Hopefully you&#8217;ll be able to apply these techniques from the beginning for your app.</p>
<p>&nbsp;</p>
<p>※Temple Run app icon used here with written permission of Imangi Studios.</p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/judging-an-app-by-its-cover-techniques-and-tools-for-creating-and-testing-a-professional-app-icon/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Code for Developing Sudoku for iPhone and OS X</title>
		<link>http://jayfuerstenberg.com/devblog/open-source-code-for-developing-sudoku-for-iphone-and-os-x?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=open-source-code-for-developing-sudoku-for-iphone-and-os-x</link>
		<comments>http://jayfuerstenberg.com/devblog/open-source-code-for-developing-sudoku-for-iphone-and-os-x#comments</comments>
		<pubDate>Sun, 03 Jun 2012 11:20:39 +0000</pubDate>
		<dc:creator>jayfuerstenberg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[sudoku]]></category>

		<guid isPermaLink="false">http://jayfuerstenberg.com/devblog/?p=100</guid>
		<description><![CDATA[My Love For Sudoku I&#8217;m a Sudoku addict. My love for Sudoku has most certainly surpassed unhealthy levels.  Naturally, being a developer I at one point had an interest in developing my own Sudoku game just to see what it &#8230; <a href="http://jayfuerstenberg.com/devblog/open-source-code-for-developing-sudoku-for-iphone-and-os-x">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>My Love For Sudoku</strong></p>
<p>I&#8217;m a Sudoku addict. My love for Sudoku has most certainly surpassed unhealthy levels.  Naturally, being a developer I at one point had an interest in developing my own Sudoku game just to see what it entails.</p>
<p>The concept of Sudoku is a very ancient one but the game&#8217;s recent popularity is attributed to the company NIKOLI which owns the copyright to the word &#8220;Sudoku&#8221; and the Japanese &#8220;数独&#8221; (lit: &#8220;number alone&#8221;) within Japan.</p>
<p>Game concepts, in and of themselves, cannot be copyrighted and to get around any copyright disputes I considered calling my game &#8220;9 Lives&#8221; and varying the gameplay enough by employing a strict rule of allowing up to 9 mistakes before the player loses. Essentially I was interested in making a Sudoku game for pros (no hints or anything).</p>
<p>However, I later learned through the <a href="http://simonhaertel.de/" target="_blank">Quinn/Tetris debacle</a> that even though game concepts cannot be copyrighted, the owners of such games still show their legal fangs if you encroach on their territory and considering that my presence here in Japan is also where NIKOLI is based I reconsidered developing my own game.</p>
<p>That was 5 years ago, when I was just beginning to learn Objective C and OS X development. While cleaning some things up on my Mac I recently rediscovered my old Sudoku board generator code and it feels like a waste to just let it sit there unused.  Instead I decided to rewrite it (the original code is too embarassing to release) and donate it to others interested in making their own Sudoku games.</p>
<p>Most of the Sudoku games I have played only offer pregenerated boards. My code creates random ones each and every time. As such it depends on a random number generator, in this case my <a href="https://github.com/jayfuerstenberg/JFCommon" target="_blank">JFRandom</a> utility class which is available on github.</p>
<p>If you are outside Japan and interested in making your own sudoku game check out my <a href="http://www.jayfuerstenberg.com/oss/objc/SudokuBoardGenerator.zip" target="_blank"><strong>Sudoku Board Generator</strong></a>.</p>
<p>&nbsp;</p>
<p><strong>How To Use It</strong></p>
<p>This one line is all you need to generate a random Sudoku board&#8230;</p>
<pre style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4e8187;">SudokuBoard<span style="color: #000000;"> *board = [</span>SudokuBoardGenerator <span style="color: #31595e;">generate</span><span style="color: #000000;">];</span></pre>
<p>Outputting the resulting Sudoku board with NSLog will show the board in full like below&#8230;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>7 1 8 5 4 3 6 2 9 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>6 9 3 2 1 8 5 7 4 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>5 4 2 9 7 6 3 1 8 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>4 3 5 7 9 1 8 6 2 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>1 6 7 8 3 2 4 9 5 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>2 8 9 4 6 5 7 3 1 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>8 5 1 6 2 7 9 4 3 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>9 2 6 3 5 4 1 8 7 </strong></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo;"><strong>3 7 4 1 8 9 2 5 6 </strong></p>
<p><span style="color: #000000;"><br />
</span></p>
<p><span style="color: #000000;">The board exposes 9 sectors (3&#215;3 grid) and the numbers contained within for you to display in your game.  That&#8217;s all there is to it.  The details are all abstracted away from you.  If you have any questions please don&#8217;t hesitate to contact me at jay [AT] this domain.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://jayfuerstenberg.com/devblog/open-source-code-for-developing-sudoku-for-iphone-and-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.434 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-25 16:21:19 -->
