<?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>VigorousCoding</title>
	<atom:link href="http://www.vigorouscoding.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vigorouscoding.com</link>
	<description>(iOS) Development and technophilia – recently also interested in design and art</description>
	<lastBuildDate>Mon, 09 Apr 2012 12:13:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>MatchBalls! v1.3 released</title>
		<link>http://www.vigorouscoding.com/2012/03/matchballs-v1-3-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=matchballs-v1-3-released</link>
		<comments>http://www.vigorouscoding.com/2012/03/matchballs-v1-3-released/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 21:00:35 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=874</guid>
		<description><![CDATA[<p>I am very happy to announce that v1.3 fixes the Savegame Bug. It is recommended for all users to update to this version. If your Eternal Score does not advance or is not saved properly, just follow these three steps: &#8230; <a href="http://www.vigorouscoding.com/2012/03/matchballs-v1-3-released/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>I am very happy to announce that v1.3 fixes the Savegame Bug. It is recommended for all users to update to this version.</p>
<p>If your Eternal Score does not advance or is not saved properly, just follow these three steps:</p>
<ol>
<li>Enter Eternal Mode</li>
<li>Save the game and exit</li>
<li>Re-enter the Eternal Mode</li>
</ol>
<p>This should fix the issue. Thank you for your patience!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/03/matchballs-v1-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MatchBalls! released</title>
		<link>http://www.vigorouscoding.com/2012/03/matchballs-released/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=matchballs-released</link>
		<comments>http://www.vigorouscoding.com/2012/03/matchballs-released/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 21:20:28 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=864</guid>
		<description><![CDATA[<p>MatchBalls! has been approved by Apple! Finally Right now I can&#8217;t really come up with more than &#8220;It&#8217;s free, go get it!!!&#8221;. Maybe &#8220;It has full retina support&#8221; will get your motor running&#8230; If you want some more info go &#8230; <a href="http://www.vigorouscoding.com/2012/03/matchballs-released/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>MatchBalls! has been approved by Apple! Finally <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Right now I can&#8217;t really come up with more than &#8220;It&#8217;s free, go get it!!!&#8221;. Maybe &#8220;It has full retina support&#8221; will get your motor running&#8230;</p>
<p>If you want some more info go to the details page for <a href="http://www.vigorouscoding.com/games/matchballs/">MatchBalls</a>! Otherwise head straight to the <a href="http://bitly.com/MatchBallsGame" target="_blank">App store</a> and download that sucker. <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/03/matchballs-released/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Naming conventions for image resources in iOS</title>
		<link>http://www.vigorouscoding.com/2012/03/naming-conventions-for-image-resources-in-ios/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=naming-conventions-for-image-resources-in-ios</link>
		<comments>http://www.vigorouscoding.com/2012/03/naming-conventions-for-image-resources-in-ios/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:52:17 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=842</guid>
		<description><![CDATA[<p>As I already posted earlier, I have just gone through the process of updating an app to the iPad retina display (hoping that it will actually come). Now I would like to share some of the things I have learned &#8230; <a href="http://www.vigorouscoding.com/2012/03/naming-conventions-for-image-resources-in-ios/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>As I already <a title="iPad Simulator in Overdrive (aka Retina)" href="http://www.vigorouscoding.com/2012/03/ipad-simulator-in-overdrive-aka-retina/">posted earlier</a>, I have just gone through the process of updating an app to the iPad retina display (hoping that it will actually come). Now I would like to share some of the things I have learned so you can avoid the problems I have run into.</p>
<p><span id="more-842"></span></p>
<p>My app is a universal app, so I have to fit all the different resource sizes in one application bundle. Before the iPad retina display was visible on the horizon, I hardcoded the iPhone retina image names into the iPad classes. But there is a better way which follows Apple&#8217;s guidelines and works with less code. Classic win-win <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The <a href="https://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/SupportingHiResScreens/SupportingHiResScreens.html" target="_blank">Apple guidelines</a> state:</p>
<p style="padding-left: 30px;"><em>Applications running in iOS 4 should now include two separate files for each image resource. One file provides a standard-resolution version of a given image, and the second provides a high-resolution version of the same image. The naming conventions for each pair of image files is as follows:</em></p>
<ul>
<li><strong>Standard: <em>&lt;ImageName&gt;</em><em>&lt;device_modifier&gt;</em><code>.</code><em>&lt;filename_extension&gt;</em></strong></li>
<li><strong>High resolution: <em>&lt;ImageName&gt;</em><code>@2x</code><em>&lt;device_modifier&gt;</em><code>.</code><em>&lt;filename_extension&gt;</em></strong></li>
</ul>
<p style="padding-left: 30px;"><em>The &lt;ImageName&gt; and &lt;filename_extension&gt; portions of each name specify the usual name and extension for the file. The &lt;device_modifier&gt; portion is optional and contains either the string <code>~ipad</code> or <code>~iphone</code>. You include one of these modifiers when you want to specify different versions of an image for iPad and iPhone. The inclusion of the <code>@2x</code> modifier for the high-resolution image is new and lets the system know that the image is the high-resolution variant of the standard image.</em></p>
<p>Let&#8217;s assume our image is supposed to be called &#8220;name&#8221; (creative&#8230; I know). We need to supply four image resources. The iPhone resources are supposed to have the <code>~iphone</code> suffix and accordingly the iPad resources need the <code>~ipad</code> suffix and the @2x for the retina display is in between the name and the suffix. So this is what we get:</p>
<ul>
<li>name~iphone.png</li>
<li>name@2x~iphone.png</li>
<li>name~ipad.png</li>
<li>name@2x~ipad.png</li>
</ul>
<p>It is important that the suffix is all lowercase. At first I tried to use <code>~iPhone</code> and <code>~iPad</code> but that did not work for me. It needed to be lowercase. Maybe that&#8217;s normal but maybe I screwed something up. Go ahead and test both versions if you like. If you find they are both working feel free to leave a comment below.</p>
<h2>Wait, that&#8217;s not exactly what I want!</h2>
<p>Before updating to iPad retina, I simply hardcoded the iPhone retina image names into the iPad classes and thusly only needed 2 image sizes for the iPhone, iPhone retina and the iPad. With this naming convention there is no need to do that any more because <code>[UIImage imageNamed:@"name.png"];</code> handles the loading of all different image sizes for me. But there is one problem: I do not want to have iPhone retina images <strong>and</strong> iPad images because they are the same.</p>
<p>Reusing iPhone retina images as the non-retina iPad versions can be achieved by simply symlinking them. To do that, just open a Terminal window and navigate to the folder the image is located in. Let&#8217;s say its called &#8220;name&#8221; (creativity&#8230; you know <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). Thus its retina version is called &#8220;name@2x~iphone.png&#8221;. All you have to do is type the following to have you iPad images:</p>
<blockquote><p><code>ln -s name@2x~iphone.png name~ipad.png</code></p></blockquote>
<p>You however should not try to create subfolders for your iPad resources and symlink across folders. AFAIK the folder tree is flattened in your app bundle and the symlinks wouldn&#8217;t be pointing to the right resources anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/03/naming-conventions-for-image-resources-in-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad Simulator in Overdrive (aka Retina)</title>
		<link>http://www.vigorouscoding.com/2012/03/ipad-simulator-in-overdrive-aka-retina/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ipad-simulator-in-overdrive-aka-retina</link>
		<comments>http://www.vigorouscoding.com/2012/03/ipad-simulator-in-overdrive-aka-retina/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 00:05:22 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=831</guid>
		<description><![CDATA[<p>Whoa, just heard about a hack that enables developers to run the iPhone/iPad Simulator in Retina mode for the iPad. For details on the hack just take a look at this tweet by Ryan Petrich, the original author of the &#8230; <a href="http://www.vigorouscoding.com/2012/03/ipad-simulator-in-overdrive-aka-retina/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>Whoa, just heard about a hack that enables developers to run the iPhone/iPad Simulator in Retina mode for the iPad. For details on the hack just take a look at <a href="https://twitter.com/#!/rpetrich/status/175472618424643584" target="_blank">this tweet</a> by Ryan Petrich, the original author of the hack. At first it didn&#8217;t work and I thought it had to do with <a href="http://www.iterm2.com/" target="_blank">iTerm2</a>, but after running it directly from finder via doubleclick – and not via Terminal/iTerm2 – it worked.</p>
<p>MatchBalls! was already submitted to Apple for review but now that I am able to test-drive it in retina my designer and myself are working hard to have retina support live ASAP. It would be awesome to be able to have a fully retina-ready app in the store at launch time for a retina iPad.</p>
<p>Here is the first screen with full retina support. The others are taking a bit longer&#8230; there are lots of graphics to produce and I can&#8217;t help all that much. Graphics still aren&#8217;t my strong suit.</p>
<p><a href="http://dl.dropbox.com/u/37577756/iOS%20Simulator%20Screen%20shot%2004.03.2012%2000.56.23.png"><img class="aligncenter size-full wp-image-834" title="iOS Simulator Screen shot 04.03.2012 00.56.23" src="http://www.vigorouscoding.com/wp-content/uploads/2012/03/iOS-Simulator-Screen-shot-04.03.2012-00.56.231.png" alt="" width="225" height="300" /></a></p>
<p>Funny that a retina iPad app can&#8217;t even be displayed entirely on a 27&#8243; iMac. On my 15&#8243;MBP it displays like a fifth of the screen – must be fun for developers with an 11&#8243; MBA <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/03/ipad-simulator-in-overdrive-aka-retina/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom gradient UILabel with an outline</title>
		<link>http://www.vigorouscoding.com/2012/02/custom-gradient-uilabel-with-an-outline/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=custom-gradient-uilabel-with-an-outline</link>
		<comments>http://www.vigorouscoding.com/2012/02/custom-gradient-uilabel-with-an-outline/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 19:08:44 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=713</guid>
		<description><![CDATA[<p>I have run into this problem a couple of times before. My friend and designer creates a beautiful image of an interface for me and I take a look at it and immediately realize that there is text with an outline &#8230; <a href="http://www.vigorouscoding.com/2012/02/custom-gradient-uilabel-with-an-outline/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>I have run into this problem a couple of times before. My friend and <a title="noirdesign" href="http://www.noirdesign.de" target="_blank">designer</a> creates a beautiful image of an interface for me and I take a look at it and immediately realize that there is text with an outline and/or gradient.</p>
<h2>The Problem</h2>
<p>I sigh on the inside because I know it can&#8217;t be inserted in the app as an image. The text needs to be localized and IMHO it&#8217;s not nice to localize images. I know that text outlines are the most basic thing for someone who is used to Photoshop and the like, but creating those for an iOS app can be a pain.</p>
<p><span id="more-713"></span></p>
<p>With my newest game – MatchBalls! – that happened again. He created artwork and I tried to make it work without the outline, but it did not come out the way it was supposed to look. The design as a whole depends on the outline. So I decided I needed a dedicated class to do what I want for future use.</p>
<h2>The Solution</h2>
<p>I went to write my own UILabel subclass KSLabel which is supposed to free me from future headaches. I want it to optionally create text with a gradient and/or an outline. So here is what I did.</p>
<p><strong>Step 1</strong>: Subclass UILabel. duh!</p>
<p><strong>Step 2</strong>: Add properties <code>drawOutline</code> and <code>drawGradient</code> to make the gradient and the outline optional.</p><pre class="crayon-plain-tag">#import 

@interface KSLabel : UILabel {
    BOOL drawOutline;
    BOOL drawGradient;
}

@property BOOL drawOutline;
@property BOOL drawGradient;

@end</pre><p><strong>Step 3</strong>: Override <code>-(void)drawTextInRect:(CGRect)rect</code>.</p>
<p>This is where the work is done. First we let our parent class UILabel draw the text as it would normally do. We create an image using that shape and fill the shape with our gradient. If we want to draw an outline around that text, we save that image for later. Then we draw an outline around that shape with a 4px border. Sadly that kills the gradient because the outline is drawn 4px inwards and 4px outwards of that shape. But hey, thats why we saved the the gradient image before. Now we can just slam that on top of the outline and we have our final outlined gradient text.</p>
<p><strong>Update</strong>: The last version was a bit outdated. Since ARC does not handle CG objects I have to release those manually: <code>CGImageRelease(alphaMask);</code>.</p><pre class="crayon-plain-tag">- (void)drawTextInRect:(CGRect)rect {
	CGContextRef context = UIGraphicsGetCurrentContext();  

	CGContextSaveGState(context);
	CGContextSetTextDrawingMode(context, kCGTextFill);    

	// Draw the text without an outline
	[super drawTextInRect:rect];

	CGImageRef alphaMask = NULL;

	if (drawGradient) {
		// Create a mask from the text
		alphaMask = CGBitmapContextCreateImage(context);

		// clear the image
		CGContextClearRect(context, rect);

		CGContextSaveGState(context);
		CGContextTranslateCTM(context, 0, rect.size.height);

		// invert everything because CoreGraphics works with an inverted coordinate system
		CGContextScaleCTM(context, 1.0, -1.0);

		// Clip the current context to our alphaMask
		CGContextClipToMask(context, rect, alphaMask);

		// Create the gradient with these colors
		CGFloat colors [] = {
			22.0f/255.0f, 107.0f/255.0f, 168.0f/255.0f, 1.0,
			71.0f/255.0f, 160.0f/255.0f, 220.0f/255.0f, 1.0
		};

		CGColorSpaceRef baseSpace = CGColorSpaceCreateDeviceRGB();
		CGGradientRef gradient = CGGradientCreateWithColorComponents(baseSpace, colors, NULL, 2);
		CGColorSpaceRelease(baseSpace), baseSpace = NULL;

		CGPoint startPoint = CGPointMake(CGRectGetMidX(rect), CGRectGetMinY(rect));
		CGPoint endPoint = CGPointMake(CGRectGetMidX(rect), CGRectGetMaxY(rect));

		// Draw the gradient
		CGContextDrawLinearGradient(context, gradient, startPoint, endPoint, 0);
		CGGradientRelease(gradient), gradient = NULL;
		CGContextRestoreGState(context);

		// Clean up because ARC doesnt handle CG
		CGImageRelease(alphaMask);
	    }

	if (drawOutline) {
		// Create a mask from the text (with the gradient)
		alphaMask = CGBitmapContextCreateImage(context);

		// Outline width
		CGContextSetLineWidth(context, 4);
		CGContextSetLineJoin(context, kCGLineJoinRound);

		// Set the drawing method to stroke
		CGContextSetTextDrawingMode(context, kCGTextStroke);

		// Outline color
		self.textColor = [UIColor whiteColor];

		// notice the +1 for the y-coordinate. this is to account for the face that the outline appears to be thicker on top
		[super drawTextInRect:CGRectMake(rect.origin.x, rect.origin.y+1, rect.size.width, rect.size.height)];

		// Draw the saved image over the outline
		// and invert everything because CoreGraphics works with an inverted coordinate system
		CGContextTranslateCTM(context, 0, rect.size.height);
		CGContextScaleCTM(context, 1.0, -1.0);
		CGContextDrawImage(context, rect, alphaMask);

		// Clean up because ARC doesnt handle CG
		CGImageRelease(alphaMask);
	}
}</pre><p><strong>Step 4</strong>: Test-drive it.</p><pre class="crayon-plain-tag">KSLabel *myLabel = [[KSLabel alloc] initWithFrame:CGRectMake(0, 0, 320, 80)];
myLabel.drawOutline = YES;
myLabel.drawGradient = YES;
myLabel.text = @&quot;Text with gradient and outline&quot;;
myLabel.textAlignment = UITextAlignmentCenter;
myLabel.font = [UIFont fontWithName:@&quot;Ballpark&quot; size:60];
[self addSubview:myLabel];</pre><p></p>
<h2>The Result</h2>
<p>Here is what text with a gradient and an outline looks like. This screen is shown right before a game of MatchBalls starts and it works like a charm. The &#8220;MatchBalls&#8221; at the top of the screen is an image &#8211; THE image &#8211; I wanted to mimic with my code (except for the arc). I think it works quite nicely.</p>
<p>I&#8217;m a nice guy, so you can just download the complete class <a href="http://www.vigorouscoding.com/wp-content/uploads/2012/03/KSLabel.zip">here</a>.</p>
<p><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/startGame_1.png" rel="lightbox-matchballs"><img class="alignleft size-thumbnail wp-image-737" title="Game Countdown &quot;2&quot;" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/startGame_1-150x150.png" alt="" width="150" height="150" /></a><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/startGame_2.png" rel="lightbox-matchballs"><img class="alignleft size-thumbnail wp-image-738" title="Game Countdown &quot;1&quot;" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/startGame_2-150x150.png" alt="" width="150" height="150" /></a><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/startGame_3.png" rel="lightbox-matchballs"><img class="alignleft size-thumbnail wp-image-739" title="Game Countdown &quot;Go!&quot;" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/startGame_3-150x150.png" alt="" width="150" height="150" /></a></p>
<p>BTW: I love the font. Another good pick by my designer. The font is called Ballpark Weiner and you can download it <a href="http://www.fontsquirrel.com/fonts/Ballpark" target="_blank">here</a>.</p>
<h2>The Future</h2>
<p>I would actually like to enhance my code by make the colors and the outline thickness variable. For this project that was not necessary so I didn&#8217;t. I will definitely update this post when I&#8217;ve had the time to make the class more reusable. Maybe I&#8217;ll even open up a GitHub account. Been wanting to do that for quite some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/02/custom-gradient-uilabel-with-an-outline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first merchandise to give away to my clients</title>
		<link>http://www.vigorouscoding.com/2012/02/my-first-merchandise-to-give-away-to-my-clients/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-first-merchandise-to-give-away-to-my-clients</link>
		<comments>http://www.vigorouscoding.com/2012/02/my-first-merchandise-to-give-away-to-my-clients/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 17:59:18 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=791</guid>
		<description><![CDATA[<p>I proudly present&#8230; *drumroll* &#8230; my first ever merchandise for my business! It was not at all planned, more of a spontaneous idea we had a few days ago. Today the writing pads arrived. I really like to sketch my &#8230; <a href="http://www.vigorouscoding.com/2012/02/my-first-merchandise-to-give-away-to-my-clients/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>I proudly present&#8230; *drumroll* &#8230; my first ever merchandise for my business! It was not at all planned, more of a spontaneous idea we had a few days ago. Today the writing pads arrived. I really like to sketch my ideas before I take them anywhere digital. Now that&#8217;s easy as π for me and my clients. But take a look and see for yourself.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/merch.png" rel="lightbox"><img class="aligncenter size-thumbnail wp-image-792" title="Merchandise" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/merch-150x150.png" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/02/my-first-merchandise-to-give-away-to-my-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adjusting a UIView to an appearing Keyboard</title>
		<link>http://www.vigorouscoding.com/2012/02/adjusting-a-uiview-to-an-appearing-keyboard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adjusting-a-uiview-to-an-appearing-keyboard</link>
		<comments>http://www.vigorouscoding.com/2012/02/adjusting-a-uiview-to-an-appearing-keyboard/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 23:08:22 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=714</guid>
		<description><![CDATA[<p>Just a quick tip I found out to make better use of space in my iPhone app. Consider the following situation: You have a Highscore View with a couple of stats of the game you just finished. Naturally you would like &#8230; <a href="http://www.vigorouscoding.com/2012/02/adjusting-a-uiview-to-an-appearing-keyboard/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>Just a quick tip I found out to make better use of space in my iPhone app. <span style="text-align: left;">Consider the following situation: You have a Highscore View with a couple of stats of the game you just finished. Naturally you would like the user to be able to enter his nickname.</span></p>
<h2 style="text-align: left;">The problem</h2>
<p style="text-align: left;">The input box is so far down in the view that it gets covered by the keyboard as soon as its activated. Now the user can enter his nickname but he can not see what he is typing. That is just not acceptable.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/Screenshot_28.png" rel="lightbox-keyboard"><img class="aligncenter size-thumbnail wp-image-715" style="display: inline;" title="Highscore View without Keyboard" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/Screenshot_28-150x150.png" alt="" width="150" height="150" /></a><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/Screenshot_27.png" rel="lightbox-keyboard"><img class="aligncenter" style="display: inline;" title="Highscore View with the keyboard blocking the input field" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/Screenshot_27-150x150.png" alt="" width="150" height="150" /></a></p>
<p><span id="more-714"></span></p>
<h2 style="text-align: left;">The solution</h2>
<p>The naive solution would be to move the input field up so that the keyboard won&#8217;t block it. But that is unsatisfying. There must be a better solution&#8230; and there is: Just register for the Keyboard notifications and move the View up exactly as much as the keyboards height.</p>
<p style="text-align: left;"><strong>Step 1</strong>: Register for the appropriate notifications. Specifically the <code>UIKeyboardWillShowNotification</code> and the <code>UIKeyboardWillHideNotification</code>. Using the following commands the method <code>-(void)keyboardWillShow</code> will be executed when the keyboard appears and the method <code>-(void)keyboardWillHide</code> will be executed when the keyboard disappears.</p>
<p></p><pre class="crayon-plain-tag">[[NSNotificationCenter defaultCenter] addObserver:self
                                selector:@selector(keyboardWillShow)
                                    name:UIKeyboardWillShowNotification
                                  object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self
                                selector:@selector(keyboardWillHide)
                                    name:UIKeyboardWillHideNotification
                                  object:nil];</pre><p></p>
<p style="text-align: left;"><strong>Step 2</strong>: Implement the methods you just registered with the Notification Center. One method moves the view out of the way and the other moves it back into place. Quite simple when know it. <code>-(void)keyboardWillShow</code> moves the view 160px upwards. In my case that looked nice. Maybe you need to change that value to suit your needs.</p>
<p></p><pre class="crayon-plain-tag">-(void)keyboardWillShow {
	// Animate the current view out of the way
    [UIView animateWithDuration:0.3f animations:^ {
        self.frame = CGRectMake(0, -160, 320, 480);
    }];
}

-(void)keyboardWillHide {
	// Animate the current view back to its original position
    [UIView animateWithDuration:0.3f animations:^ {
        self.frame = CGRectMake(0, 0, 320, 480);
    }];
}</pre><p></p>
<p style="text-align: left;"><strong>Step 3</strong>: Tidy things up. At some point you really should remove your listener from the notification center. Otherwise, from that point on, your listener will be called for every keyboard that appears and most likely your listener will not be around for that&#8230; which ends badly.</p>
<p></p><pre class="crayon-plain-tag">// If you want to remove the listener completely just use this one line
[[NSNotificationCenter defaultCenter] removeObserver:self.view];

// If you want to remove the listener for the 2 notifications and nothing more, then use the following lines
[[NSNotificationCenter defaultCenter] removeObserver:self
                                name:UIKeyboardWillShowNotification
                                object:nil];

[[NSNotificationCenter defaultCenter] removeObserver:self
                                name:UIKeyboardWillHideNotification
                                object:nil];</pre><p></p>
<h2 style="text-align: left;">The Result</h2>
<p>Upon activating the input field the view moves smoothly out of the way and when you press &#8220;Done&#8221; the view moves back to where it was before.</p>
<p style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/Screenshot_29.png" rel="lightbox-keyboard"><img class="aligncenter size-thumbnail wp-image-716" style="display: inline;" title="Highscore View making room for the keyboard" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/Screenshot_29-150x150.png" alt="" width="150" height="150" /></a></p>
<h2 style="text-align: left;">Possible Problems</h2>
<p style="text-align: left;">Currently the time for the keyboard to show is 0.3 seconds, but Apple may change that at any time. This is also true for the keyboard size. The default keyboard in portait mode is 216px in height and in landscape it is 162px, but that may also change at any time. If (for any reason) you need to find out the keyboard size you can do that pretty easily.</p>
<p></p><pre class="crayon-plain-tag">// Register for the event including the notification
// notice the ':' after the selector 'keyboardWillShow' ?
[[NSNotificationCenter defaultCenter] addObserver:self
                                selector:@selector(keyboardWillShow:)
                                    name:UIKeyboardWillShowNotification
                                  object:nil];

// Read the userInfo for the key UIKeyboardFrameBeginUserInfoKey
-(void)keyboardWillShow:(NSNotification*)notification {
    NSDictionary* keyboardInfo = [notification userInfo];
    NSValue* keyboardFrameBegin = [keyboardInfo valueForKey:UIKeyboardFrameBeginUserInfoKey];
    CGRect keyboardFrameBeginRect = [keyboardFrameBegin CGRectValue];

    NSLog(@&quot;%@&quot;, NSStringFromCGRect(keyboardFrameBeginRect));
}</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/02/adjusting-a-uiview-to-an-appearing-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In-App Purchases: Patience is key</title>
		<link>http://www.vigorouscoding.com/2012/02/in-app-purchases-patience-is-key/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=in-app-purchases-patience-is-key</link>
		<comments>http://www.vigorouscoding.com/2012/02/in-app-purchases-patience-is-key/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 16:34:10 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=709</guid>
		<description><![CDATA[<p>If you ever want to create an app with IAPs take my adivce: &#8220;Be patient.&#8221; You can bootstrap your programming by using the brilliant IAP framework MKStoreKit. Mugunth Kumar was kind enough to release his creation for everyone to use, &#8230; <a href="http://www.vigorouscoding.com/2012/02/in-app-purchases-patience-is-key/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>If you ever want to create an app with IAPs take my adivce: &#8220;Be patient.&#8221; You can bootstrap your programming by using the brilliant IAP framework <a title="MKStoreKit" href="http://blog.mugunthkumar.com/coding/using-mkstorekit-in-your-apps/" target="_blank">MKStoreKit</a>. Mugunth Kumar was kind enough to release his creation for everyone to use, so you do not really need to dive too deep into Apple&#8217;s StoreKit framework. His framework is a bliss to incorporate into your app and configuring it is quite easy as well (see his blog post).</p>
<h2>Take your time</h2>
<p>When I started developing <em>MatchBalls!</em> I created four In-App Purchases in iTunes Connect and started testing after a while. Yesterday I added an additional IAP to iTunes Connect and suddenly started getting errors with all of my IAPs. I started debugging right away and hit a brick wall. I searched the web for possible reasons of IAPs not working and found lots of checklists (see <a href="http://stackoverflow.com/questions/4705391/iphone-problem-with-in-app-purchases" target="_blank">here</a>, <a href="http://stackoverflow.com/questions/5868728/in-app-purchases-with-mkstorekit-failing-problem-in-itunes-connect-configurati" target="_blank">here</a>, <a href="http://stackoverflow.com/questions/6934308/in-app-purchase-returning-0-products-and-invalidproductidentifier" target="_blank">here</a> and <a href="http://stackoverflow.com/questions/5676239/in-app-purchaseiap-simple-questions-i-have-a-problem" target="_blank">here</a>) and one superb <a href="http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/" target="_blank">tutorial</a>. One tip was the golden one. <em>&#8220;Just wait&#8221;</em>. After 20 hours some magic happened on Apple&#8217;s servers and everything works like a charm again.</p>
<p>A simple warning &#8220;This action renders your IAPs unusable for 12-24 hours&#8221; would suffice to let people know about this. Apple is so brilliant when it comes to guiding users and letting them know about important stuff, but sometimes it seems like they do not really care about their developers (does anyone else play the game &#8220;Guess in which corner the action button appears in iTunes Connect&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/02/in-app-purchases-patience-is-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Design of Everyday Things &#8211; Donald A. Norman [Book review]</title>
		<link>http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-design-of-everyday-things-donald-a-norman-book-review</link>
		<comments>http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 21:09:11 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Broadening my horizon]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=650</guid>
		<description><![CDATA[<p>This review is long overdue. I read the book a while ago and gave it some time to let the information sink in &#8211; and it was a lot of information. It seemed like an odd choice for me to &#8230; <a href="http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>This review is long overdue. I read the book a while ago and gave it some time to let the information sink in &#8211; and it was a lot of information.</p>
<p>It seemed like an odd choice for me to read because I am not a designer. I am a programmer and I wouldn&#8217;t be able to produce something beautiful if my life depended on it. Before reading this book, thats what I thought design is all about, beauty. Now I know that there are more aspects to design and the book also helped me to think more abstractly and (try to) derive interaction patterns from hardware devices and translate them to well designed user interfaces.</p>
<p>If you are interested in design &#8211; be it industrial, software or any other kind of design &#8211; you probably already read it. If not, you should probably read it.</p>
<div></div>
<p><a title="Donald A. Norman - The Design of Everyday Things" href="http://www.amazon.de/Design-Everyday-Things-Don-Norman/dp/0465067107"><img class="aligncenter size-full wp-image-369" title="Donald E. Norman - The Design of Everyday Things" src="http://www.vigorouscoding.com/wp-content/uploads/2011/12/doet.jpg" alt="" width="104" height="160" /></a> <span id="more-650"></span></p>
<p>In his book Norman takes a close look at how user interfaces are designed and tries to scientifically explain why some designs are superior to others or why one solution is prone to mistakes by the user. The examples he chose to illustrate his ideas are mostly hardware examples. I should probably mention that the book was first published in 1988, so the kind of user interfaces we are used to did not yet exist.</p>
<p>Doors are one of his pet peeves. The book is full of examples of poorly designed doors or just plain crazy doors. But he also mentions a few good examples. Especially automobile manufacturers have quite a good track record designing doors. Admittedly, they do have the advantage that doors on cars always open to the outside. Norman sums it up quite nicely:</p>
<blockquote><p>&#8220;Somehow, when a device as simple as a door has to come with an instruction manual – even a one-word manual – then it is a failure, poorly designed&#8221; (p. 87)</p></blockquote>
<p>Obviously Norman goes into much more detail than I am. His book is a lot more scientific than what I am writing here – and doors are not the only examples Norman has to offer. Just a few that stuck in my head are telephones, light switches, motorcycle turn signals, faucets, even the NES instruction manual is featured in his book.</p>
<h2>Gulf of execution vs. Gulf of Evaluation</h2>
<p>Norman describes the world and the way we interact with it in seven stages of action. We observe the world, evaluate the current state it is in and form a picture of the state we would like it to be in – a goal. From this goal we infer a sequence of actions which we think will manipulate the world in a way that it changes its current state to the desired state. After executing these sequence of actions we observes the world again and evaluate whether the current state it is in, is the state we want it to be.</p>
<p>How translates this to design? Good design is supposed to provide actions that correspond to the users intentions. Norman calls the difference between the allowable actions and the users intentions the <em>gulf of execution</em>.</p>
<p>Good design is also supposed to provide directly perceivable physical representation which can be translated into a users intententions. This is what Norman calls the <em>gulf of evaluation</em>.</p>
<p>So how does a designer go about bridging these two gulfs? There is no perfect solution for this, but Norman provides a couple of pretty good pointers, or better questions you should ask yourself about your design. I will only share two of those questions, because I don&#8217;t want to kill his book sales completely <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><em>Visibility</em> – Does the design provide a visual clue in which state the device is currently in and what actions are available to the users?<br />
<em>Feedback</em> – Does the user receive continuous feedback about the results of his actions?</p>
<h2>Natural mappings</h2>
<p>Natural mappings take advantage of physical analogies and cultural standards for immediate understanding.</p>
<blockquote><p>&#8220;If a design depends upon labels, it may be faulty. Labels are important and often necessary, but the appropriate use of natural mappings can minimize the need for them. Whenever labels seem necessary, consider another design.&#8221; (p. 78)</p></blockquote>
<p>Norman illustrates natural mappings with different layouts of stoves and their controls. Since I don&#8217;t want to rip off his book I took a look around and found a simple example.</p>
<p>My desk drawers seem like an example of good design. They are lockable and the orientation of the keyhole takes advantage of natural mappings to form a mental model in the users head.</p>
<p>Unlocked, the keyhole is parallel to the drawers, which signals &#8220;I am unlocked &#8211; Open me&#8221;. When it is locked, it is orthogonal to the drawers which signals &#8220;I am locked &#8211; Better luck next time&#8221;. Even without trying to open the drawers it is obvious that they are (un)locked.</p>
<div style="text-align: center;"><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/unlocked.jpg" rel="lightbox-drawer"><img class="size-thumbnail wp-image-659" style="display: inline;" title="Unlocked" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/unlocked-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://www.vigorouscoding.com/wp-content/uploads/2012/02/locked.jpg" rel="lightbox-drawer"><img class="size-thumbnail wp-image-658" style="display: inline;" title="Locked" src="http://www.vigorouscoding.com/wp-content/uploads/2012/02/locked-150x150.jpg" alt="" width="150" height="150" /></a></div>
<p>Admittedly, this is a pretty basic example, but think about what would have happened if the orientation of the keyhole were the other way around? What kind of mental model would support instantly knowing what state the lock is in? I can&#8217;t think of one and that&#8217;s why I think it is good design.</p>
<h2>Norman and the future</h2>
<p>Interestingly enough Norman is predicting the future quite accurately on multiple occasions. At one point in his book he as writing about something that sounds a lot like the iPad to me. But make up your own mind&#8230;</p>
<blockquote><p>The computer of the future is perhaps best illustrated by my imaginary perfect calendar. [...] This imaginary calendar looks like a calendar. It&#8217;s about the size of a standard pad of paper, it opens up to display dates. But it really is a computer, so it can do things that today&#8217;s appointment calendar cannot. [...] Most important, it can also connect itself to my other systems. Thus, whatever I enter into the calendar gets transmitted to my office and home systems so that they are always in synchrony. (p. 185&amp;186)</p></blockquote>
<p>Other times he is a bit off in a funny way (when you look at it from todays modern point of view). Discussing to problems of self-threading projectors his final remark is: &#8220;Well in a while it won&#8217;t matter. There won&#8217;t be any film, just videotape&#8221;. Not quite&#8230; <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ridiculing Norman is not my intention. It just stood out to me. Norman doesn&#8217;t try to predict the future. He is merely looking at the mistakes of the past and describing how design can be better in the future &#8211; or rather how future designers can be better.</p>
<h2>Final thoughts</h2>
<p>To sum it all up, the book was a revelation for me. I will never be able to see something as simple as a door for what it is, a plain door. I will always see the designers intentions (and possibly his mistakes). Somehow a lot of things make more sense to me now that I look at things differently.</p>
<p>If this book had not taught me anything else but to take a closer look at things, it would still have been a pretty good investment in my personal and professional development. After reading it I started noticing things I never noticed before &#8211; small things that is. But luckily for me the book gave me more than this. A whole new perspective and things to think about. A truly good read.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/02/the-design-of-everyday-things-donald-a-norman-book-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIButtons with pseudorealistic perspective</title>
		<link>http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uibuttons-with-pseudorealistic-perspective</link>
		<comments>http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 17:19:13 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://www.vigorouscoding.com/?p=598</guid>
		<description><![CDATA[<p>For a little side-project I wanted buttons to look like they&#8217;re being pushed &#8216;inside&#8217; the interface when active. To match the overall look of the project the first step was to create two embossed images in Photoshop. One with emboss &#8230; <a href="http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
 ]]></description>
			<content:encoded><![CDATA[<p>For a little side-project I wanted buttons to look like they&#8217;re being pushed &#8216;inside&#8217; the interface when active. To match the overall look of the project the first step was to create two embossed images in Photoshop. One with emboss direction &#8216;up&#8217; and one with emboss direction &#8216;down&#8217;. Then assign these images to the relevant control states of the button. Simple enough &#8211; and already looking the way I want it to. (Hover over the image to see what I mean.)</p>
<p><img class="aligncenter size-full wp-image-616" title="button" onmouseover="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/buttonHighlighted.png'" onmouseout="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/buttonNormal'" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/buttonNormal.png" alt="Embossed Button" width="320" height="80" /> <span id="more-598"></span></p>
<p>This is what the button looks like in code. Nothing special so far. Okay, I did not simply create and assign the background images&#8230; I made them resizable by using the UIImage method stretchableImageWithLeftCapWidth:topCapHeight: (from iOS5 on you would use the resizableImageWithCapInsets:).</p><pre class="crayon-plain-tag">UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom];
playButton.frame = CGRectMake(0, 0, 160, 40);
[playButton setTitle:@&quot;Play&quot; forState:UIControlStateNormal];

// Set the state images
[playButton setBackgroundImage:[[UIImage imageNamed:@&quot;resizableButtonNormal.png&quot;] stretchableImageWithLeftCapWidth:10 topCapHeight:0] forState:UIControlStateNormal];
[playButton setBackgroundImage:[[UIImage imageNamed:@&quot;resizableButtonHighlighted.png&quot;] stretchableImageWithLeftCapWidth:10 topCapHeight:0] forState:UIControlStateHighlighted];

[yourView addSubview:playButton];</pre><p><img class="aligncenter size-full wp-image-616" title="button" onmouseover="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/button_1_Highlighted.png'" onmouseout="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png'" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png" alt="Embossed Button" width="320" height="80" /></p>
<p>One thing did not look right&#8230; I didn&#8217;t like the fact that the Textlabel stayed in the same place for both states. That kind of killed the illusion of a &#8216;real&#8217; pushbutton for me. So I dug in the documentation but couldn&#8217;t really find any useful information. OK, that&#8217;s a lie – The Apple Documentation is really helpful and always up to date! &#8230;but I digress. I did not find any information on setting the frame of the titleLabel depending on the state of the button.</p>
<p>I did not want to subclass UIButton just to move the frame of the textLabel around it the highlighted state, so I experimented a little and here is the solution I came up with (I can only assume that trick has been around for quite some time, but I never read about it anywhere else):</p><pre class="crayon-plain-tag">playButton.titleLabel.shadowOffset = CGSizeMake(-1, -1);

[playButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[playButton setTitleShadowColor:[UIColor clearColor] forState:UIControlStateNormal];

[playButton setTitleColor:[UIColor clearColor] forState:UIControlStateHighlighted];
[playButton setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateHighlighted];</pre><p>Notice how I alternate between shadowColor and textColor? That is basically the whole trick. In the normal state you can only see the text itself and the shadow is transparent. In the highlighted state the shadowColor is white and the textColor is transparent. I like it the best with shadowOffset = CGSizeMake(-1,-1), but it also looks good with shadowOffset = CGSizeMake(0, -1).</p>
<p>So, this is what you get in the end.</p>
<p><img class="aligncenter size-full wp-image-616" title="button" onmouseover="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonHighlighted.png'" onmouseout="javascript:this.src='http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png'" src="http://www.vigorouscoding.com/wp-content/uploads/2012/01/finalButtonNormal.png" alt="Embossed Button" width="320" height="80" /></p>
<h2>Downside</h2>
<ul>
<li>Well as you might have already thought while reading this, if you use this technique to give your UIButtons depth, your text can&#8217;t have a shadow (because it already has/is a shadow). For me this is not really a problem because the shadow would be used to give the text depth &#8211; to make it look like it is not <strong><em>on</em></strong> the button, but <strong><em>above</em></strong> it which would not fit with the whole idea of this button.</li>
<li>One could call the buttons ugly&#8230; I like &#8216;retro&#8217; a bit better <img src='http://www.vigorouscoding.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.vigorouscoding.com/2012/01/uibuttons-with-pseudorealistic-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

