<?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>FlexiCoder Blog &#187; iPhone</title>
	<atom:link href="http://www.flexicoder.com/blog/index.php/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexicoder.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 15:11:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CFBundleiconfile does not have an extension</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/07/cfbundleiconfile-does-not-have-an-extension/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/07/cfbundleiconfile-does-not-have-an-extension/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:11:31 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iOS4]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=335</guid>
		<description><![CDATA[Currently there is an issue with Apples Application Loader, although the documentation states that you can omit the file extension from the Icon File name, and this works when running locally, when you come to submit it to the app store it fails validation.
At the moment you have to specify the names using the CFBundleIconFiles

Social [...]]]></description>
			<content:encoded><![CDATA[<p>Currently there is an issue with Apples Application Loader, although the documentation states that you can omit the file extension from the Icon File name, and this works when running locally, when you come to submit it to the app store it fails validation.</p>
<p>At the moment you have to specify the names using the CFBundleIconFiles<br />
<img src="http://www.flexicoder.com/blog/wp-content/uploads/2010/07/Screen-shot-2010-07-28-at-16.09.49.png" alt="Screen shot 2010-07-28 at 16.09.49" title="Screen shot 2010-07-28 at 16.09.49" width="409" height="190" class="aligncenter size-full wp-image-336" /></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/07/cfbundleiconfile-does-not-have-an-extension/&title=CFBundleiconfile+does+not+have+an+extension&text=Currently+there+is+an+issue+with+Apples+Application+Loader%2C+although+the+documentation+states+that+you+can+omit+the+file+extension+from+the+Icon+File+name%2C+and+this+works+when+running+locally%2C+when...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/07/cfbundleiconfile-does-not-have-an-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Truly quit app under iOS4</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/07/truly-quit-app-under-ios4/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/07/truly-quit-app-under-ios4/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 11:07:20 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iOS4]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=333</guid>
		<description><![CDATA[Great article that explains how to terminate your app so that it doesn&#8217;t go into suspend mode, basic details are here
Multi-tasking can be great, but it has added some complexity to programming on the iPhone.  For many apps there really is no advantage. For instance, does the “That’s What She Said” button really need [...]]]></description>
			<content:encoded><![CDATA[<p>Great <a href="http://maniacdev.com/2010/07/screw-multi-tasking-how-to-make-your-ios-4-apps-exit-for-real/">article</a> that explains how to terminate your app so that it doesn&#8217;t go into suspend mode, basic details are here</p>
<p>Multi-tasking can be great, but it has added some complexity to programming on the iPhone.  For many apps there really is no advantage. For instance, does the “That’s What She Said” button really need to stay in memory?</p>
<p>It’s some added complexity that programmers don’t need.. some of the more complex memory intensive apps will just exit anyways, and programming the app to suspend can be a highly complicated task.</p>
<p>Fortunately there is a simple way to make your iOS 4 apps terminate for real when the user taps the home button.</p>
<p>This is a simple process:</p>
<p>Open your info.plist file<br />
Add The Key UIApplicationExitsOnSuspend<br />
Set the new key to YES<br />
Now your applicationwillterminate: method will be run when the user taps the home key, and your app will exit for real.</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/07/truly-quit-app-under-ios4/&title=Truly+quit+app+under+iOS4&text=Great+article+that+explains+how+to+terminate+your+app+so+that+it+doesn%26%238217%3Bt+go+into+suspend+mode%2C+basic+details+are+here+Multi-tasking+can+be+great%2C+but+it+has+added+some+complexity+to+programming...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/07/truly-quit-app-under-ios4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS4 EXEC_BAD_ACCESS with setHidesBottomBarWhenPushed</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/06/ios4-exec_bad_access-with-sethidesbottombarwhenpushed/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/06/ios4-exec_bad_access-with-sethidesbottombarwhenpushed/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 15:33:30 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iOS4]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=331</guid>
		<description><![CDATA[Raised the following bug with Apple, (Id 8126566)
Get EXEC_BAD_ACCESS when hiding a bottom bar that doesn&#8217;t exist
Steps to Reproduce:
	SettingsViewController*  settings = [[SettingsViewController alloc] init];
	[settings setHidesBottomBarWhenPushed:YES];
	[self.navigationController pushViewController:settings animated:YES]; 
	[settings release];
  The active view doesn&#8217;t have a bottom bar
Expected Results:
When the view is popped it should ignore the fact that there was no bottom bar
Actual [...]]]></description>
			<content:encoded><![CDATA[<p>Raised the following bug with Apple, (Id 8126566)</p>
<p>Get EXEC_BAD_ACCESS when hiding a bottom bar that doesn&#8217;t exist</p>
<p>Steps to Reproduce:</p>
<p>	SettingsViewController*  settings = [[SettingsViewController alloc] init];<br />
	[settings setHidesBottomBarWhenPushed:YES];<br />
	[self.navigationController pushViewController:settings animated:YES]; </p>
<p>	[settings release];</p>
<p>  The active view doesn&#8217;t have a bottom bar</p>
<p>Expected Results:<br />
When the view is popped it should ignore the fact that there was no bottom bar</p>
<p>Actual Results:<br />
get an exec_bad_access</p>
<p>Regression:</p>
<p>Notes:<br />
removing the line that setHidesBottomBarWhenPushed, corrects the issue. </p>
<p>Obviously this is redundant code and I shouldn&#8217;t be calling it (I&#8217;ve now removed it), but I would of thought he SDK would check before trying to restore a non existent bottombar</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/06/ios4-exec_bad_access-with-sethidesbottombarwhenpushed/&title=iOS4+EXEC_BAD_ACCESS+with+setHidesBottomBarWhenPushed&text=Raised+the+following+bug+with+Apple%2C+%28Id+8126566%29+Get+EXEC_BAD_ACCESS+when+hiding+a+bottom+bar+that+doesn%26%238217%3Bt+exist+Steps+to+Reproduce%3A+%09SettingsViewController%2A++settings+%3D...&tags=bottom+bar" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/06/ios4-exec_bad_access-with-sethidesbottombarwhenpushed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Images onto the iPhone Simulator</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/06/getting-images-onto-the-iphone-simulator/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/06/getting-images-onto-the-iphone-simulator/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 13:21:34 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[Simulator]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=325</guid>
		<description><![CDATA[To add your own pictures to the simulator, get the simulator running and then drag your image onto the simulator. This will cause the simulator to open it mobile safari. Then mouse down and hold on the image, you will then see the following prompt&#8230;
Clicking save will then include your image.
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>To add your own pictures to the simulator, get the simulator running and then drag your image onto the simulator. This will cause the simulator to open it mobile safari. Then mouse down and hold on the image, you will then see the following prompt&#8230;<br />
<div id="attachment_326" class="wp-caption aligncenter" style="width: 347px"><img src="http://www.flexicoder.com/blog/wp-content/uploads/2010/06/Screen-shot-2010-06-04-at-14.15.47.png" alt="Upload image to simulator" title="Image to simulator" width="337" height="497" class="size-full wp-image-326" /><p class="wp-caption-text">Upload image to simulator</p></div></p>
<p>Clicking save will then include your image.</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/06/getting-images-onto-the-iphone-simulator/&title=Getting+Images+onto+the+iPhone+Simulator&text=To+add+your+own+pictures+to+the+simulator%2C+get+the+simulator+running+and+then+drag+your+image+onto+the+simulator.+This+will+cause+the+simulator+to+open+it+mobile+safari.&tags=simulator" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/06/getting-images-onto-the-iphone-simulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Payments from Apple &#8211; Company VAT Return</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/06/payments-from-apple-company-vat-return/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/06/payments-from-apple-company-vat-return/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 13:22:40 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=323</guid>
		<description><![CDATA[Working out what you do with a payment from Apple, when you are lucky enough to get one, can be quite tricky for a VAT registered company, this is the information I&#8217;ve been able to gather so far, via the Apple Developers Forum (so thanks goes to them)&#8230;..
Apple act as an undisclosed agent. You supply [...]]]></description>
			<content:encoded><![CDATA[<p>Working out what you do with a payment from Apple, when you are lucky enough to get one, can be quite tricky for a VAT registered company, this is the information I&#8217;ve been able to gather so far, via the Apple Developers Forum (so thanks goes to them)&#8230;..</p>
<p>Apple act as an undisclosed agent. You supply your products to Apple (one supply line), who then market and supply them to consumers (another supply line). Apple charge VAT on their supply line, as you&#8217;d expect.</p>
<p>Apple&#8217;s commission is a markup in the price, which they then add VAT to. This is very important. At no point do Apple invoice you for commission. Because of this, under HMRC rules this isn&#8217;t deemed to be a supply of &#8220;agency services&#8221; from Apple to you (the agency services in question being the marketing and sale of Apps on iTunes). That&#8217;s the second supply line &#8211; Apple to the Consumer. You can then account for VAT on your supply to Apple as normal. Because you are supplying software to Apple&#8217;s EU subsidiary, HMRC&#8217;s place of supply regulations mean you&#8217;re outside the scope for VAT.</p>
<p>So:</p>
<p>You sell an app for £0.99 (it&#8217;s an easy number to use in this example, for simplicity)<br />
Apple charges the user £0.84 (plus VAT)<br />
Apple takes their commission (£0.25), except it&#8217;s technically a mark-up on price, not commission.<br />
This leaves £0.59, which is the cost of supply. This is what you would invoice Apple for (even if you&#8217;re only generating invoices for your own internal paperwork)<br />
As you supplied your product to Apple for £0.59, who then sold it on at a markup to the public, you were supplying directly to a business, and thus outside the scope of VAT.</p>
<p>Fortunately, the contract you have isn&#8217;t with Apple UK, but Apple Sàrl, based in Luxumberg. When a seller in one EU member state invoices a company in a different EU member state they can zero rate the VAT. You should still put VAT as an item on your invoices, but rate it at zero (ie, £0.00). As long as you use the  addresses below on your invoices, HMRC should be satisfied.</p>
<p>Really Important point: Because your iTunes income is coming from another member state, you need to declare it in Box 8 of your VAT return. If you have an accountant you don&#8217;t need to worry about this, you just need to make sure s/he is aware your App income is from within the EU but outside the UK.</p>
<p>Should you need an address and Luxumberg VAT number for your records, it&#8217;s as follows:</p>
<p>Billing Address:<br />
iTunes s.à r. l.<br />
8 rue Heinrich Heine<br />
L-1720 Luxembourg<br />
TVA/VAT No.: LU20165772</p>
<p>Invoicing Address:<br />
App Store Invoicing<br />
Apple Operations Europe<br />
iTunes s.à r. l.<br />
Hollyhill Industrial Estate<br />
Hollyhill<br />
Cork Ireland</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/06/payments-from-apple-company-vat-return/&title=Payments+from+Apple+%26%238211%3B+Company+VAT+Return&text=Working+out+what+you+do+with+a+payment+from+Apple%2C+when+you+are+lucky+enough+to+get+one%2C+can+be+quite+tricky+for+a+VAT+registered+company%2C+this+is+the+information+I%26%238217%3Bve+been+able+to+gather+so...&tags=supply+line%2C+apple%2C+supply" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/06/payments-from-apple-company-vat-return/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>NSLog &#8211; debugging tool</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/03/nslog-debugging-tool/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/03/nslog-debugging-tool/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 13:13:26 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=306</guid>
		<description><![CDATA[Came across this useful blog that shows you can override the description method of an object and when you display object using NSLog it will show the extra info you&#8217;ve included!
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>Came across this useful <a href="http://iPhoneDeveloperTips.com/cocoa/overriding-nsobject-description-method.html">blog</a> that shows you can override the description method of an object and when you display object using NSLog it will show the extra info you&#8217;ve included!</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/03/nslog-debugging-tool/&title=NSLog+%26%238211%3B+debugging+tool&text=Came+across+this+useful+blog+that+shows+you+can+override+the+description+method+of+an+object+and+when+you+display+object+using+NSLog+it+will+show+the+extra+info+you%26%238217%3Bve+included%21&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/03/nslog-debugging-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Configuration Utility</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/03/iphone-configuration-utility/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/03/iphone-configuration-utility/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 09:15:09 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=304</guid>
		<description><![CDATA[Link to the iPhone Configuration Utility
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>Link to the <a href="http://support.apple.com/kb/DL851?viewlocale=en_US">iPhone Configuration Utility</a></p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/03/iphone-configuration-utility/&title=iPhone+Configuration+Utility&text=Link+to+the+iPhone+Configuration+Utility...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/03/iphone-configuration-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate email address on the iPhone</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/03/validate-email-address-on-the-iphone/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/03/validate-email-address-on-the-iphone/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 11:03:55 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[Core Data]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=299</guid>
		<description><![CDATA[Here is some simple code that allows you to validate email addresses that have been entered by a user on an iPhone. It does use NSPredicate, which is only available on OS 3.0 and above;


	NSString *email = [newEmailAddress.text lowercaseString];
	NSString *emailRegEx =
    @"(?:[a-z0-9!#$%\\&#038;'*+/=?\\^_`{&#124;}~-]+(?:\\.[a-z0-9!#$%\\&#038;'*+/=?\\^_`{&#124;}"
    @"~-]+)*&#124;\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\"
    @"x7f]&#124;\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-"
   [...]]]></description>
			<content:encoded><![CDATA[<p>Here is some simple code that allows you to validate email addresses that have been entered by a user on an iPhone. It does use NSPredicate, which is only available on OS 3.0 and above;</p>
<p><code></p>
<pre class="brush:csharp">
	NSString *email = [newEmailAddress.text lowercaseString];
	NSString *emailRegEx =
    @"(?:[a-z0-9!#$%\\&#038;'*+/=?\\^_`{|}~-]+(?:\\.[a-z0-9!#$%\\&#038;'*+/=?\\^_`{|}"
    @"~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\"
    @"x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-"
    @"z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5"
    @"]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-"
    @"9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21"
    @"-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])";

	NSPredicate *regExPredicate =[NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegEx];
	BOOL myStringMatchesRegEx = [regExPredicate evaluateWithObject:email];
	if(!myStringMatchesRegEx){
		UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Correct Email" message:@"Please enter a valid email address" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
		[alert show];
		[alert release];
	}
</pre>
<p></code></p>
<p>The code is based on this <a href="http://cocoawithlove.com/2009/06/verifying-that-string-is-email-address.html">article</a> which describes this in a lot more detail.</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/03/validate-email-address-on-the-iphone/&title=Validate+email+address+on+the+iPhone&text=Here+is+some+simple+code+that+allows+you+to+validate+email+addresses+that+have+been+entered+by+a+user+on+an+iPhone.+It+does+use+NSPredicate%2C+which+is+only+available+on+OS+3.0+and+above%3B+++%09NSString...&tags=a-z0-9" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/03/validate-email-address-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>switch case compile error</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/03/switch-case-compile-error/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/03/switch-case-compile-error/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 11:41:30 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[Xcode]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=295</guid>
		<description><![CDATA[If you are using a switch case similar to the one below:

	switch (row) {
		case 0:
			int i;
			i = row + 10;
			NSLog(@"%d",i);
			break;
		default:
			break;
	}

You&#8217;ll get a compile error, &#8220;Expected expression before &#8216;int&#8217;&#8221;. If you need to declare a variable enclose the code in curly braces and the error goes away&#8230;.

	switch (row) {
		case 0:
		{
			int i;
			i = row + 10;
			NSLog(@"%d",i);
			break;
		}
		default:
			break;
	}

Note that [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using a switch case similar to the one below:</p>
<pre class="brush:c#">
	switch (row) {
		case 0:
			int i;
			i = row + 10;
			NSLog(@"%d",i);
			break;
		default:
			break;
	}
</pre>
<p>You&#8217;ll get a compile error, &#8220;Expected expression before &#8216;int&#8217;&#8221;. If you need to declare a variable enclose the code in curly braces and the error goes away&#8230;.</p>
<pre class="brush:c#">
	switch (row) {
		case 0:
		{
			int i;
			i = row + 10;
			NSLog(@"%d",i);
			break;
		}
		default:
			break;
	}
</pre>
<p>Note that the error only occurs if the variable declaration is the first statement in the code block.</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/03/switch-case-compile-error/&title=switch+case+compile+error&text=If+you+are+using+a+switch+case+similar+to+the+one+below%3A++%09switch+%28row%29+%7B+%09%09case+0%3A+%09%09%09int+i%3B+%09%09%09i+%3D+row+%2B+10%3B+%09%09%09NSLog%28%40%22%25d%22%2Ci%29%3B+%09%09%09break%3B+%09%09default%3A+%09%09%09break%3B+%09%7D++You%26%238217%3Bll+get+a+compile+error%2C...&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/03/switch-case-compile-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great tool for iPhone Mockups</title>
		<link>http://www.flexicoder.com/blog/index.php/2010/03/great-tool-for-iphone-mockups/</link>
		<comments>http://www.flexicoder.com/blog/index.php/2010/03/great-tool-for-iphone-mockups/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 10:16:38 +0000</pubDate>
		<dc:creator>flexicoder</dc:creator>
				<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[useful links]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.flexicoder.com/blog/?p=291</guid>
		<description><![CDATA[Used OmniGraffle to produce mockups for my latest iPhone project, its pretty easy yo use and there are a number of good stencils that allow for most of the UI Kit controls and even the iPad!
Social Bookmarking]]></description>
			<content:encoded><![CDATA[<p>Used <a href="http://www.omnigroup.com/products/OmniGraffle/">OmniGraffle</a> to produce mockups for my latest iPhone project, its pretty easy yo use and there are a number of good <a href="http://graffletopia.com/stencils/tags/iphone">stencils</a> that allow for most of the UI Kit controls and even the iPad!</p>
<br/><a href="http://www.socialmarker.com/?link=http://www.flexicoder.com/blog/index.php/2010/03/great-tool-for-iphone-mockups/&title=Great+tool+for+iPhone+Mockups&text=Used+OmniGraffle+to+produce+mockups+for+my+latest+iPhone+project%2C+its+pretty+easy+yo+use+and+there+are+a+number+of+good+stencils+that+allow+for+most+of+the+UI+Kit+controls+and+even+the+iPad%21&tags=" target="_blank"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a><noscript><a href="http://www.socialmarker.com" >Social Bookmarking</a></noscript>]]></content:encoded>
			<wfw:commentRss>http://www.flexicoder.com/blog/index.php/2010/03/great-tool-for-iphone-mockups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
