<?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>Tomorrow Evening &#187; objectivec</title>
	<atom:link href="http://blog.tomorrowevening.com/tag/objectivec/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tomorrowevening.com</link>
	<description>Digitally Driven</description>
	<lastBuildDate>Fri, 16 Jul 2010 06:33:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Objective C Quick Methods</title>
		<link>http://blog.tomorrowevening.com/iphone/objective-c-quick-methods/</link>
		<comments>http://blog.tomorrowevening.com/iphone/objective-c-quick-methods/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:40:10 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objectivec]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=177</guid>
		<description><![CDATA[This post will be updated the more I use Objective C. Quick UIAlertView +&#40;void&#41;showPopup:&#40;NSString *&#41;title message:&#40;NSString *&#41;message buttonTitle:&#40;NSString *&#41;buttonTitle popupDelegate:&#40;id&#41;popupDelegate &#160; &#123; /** * Recreates UIAlertView functionality using 1 line of code: * example: * #import &#34;Static.h&#34; * [Static showPopup:@&#34;Error!&#34; * message:@&#34;You need an internet connection to view this page.&#34; * buttonTitle:@&#34;OK&#34; * popupDelegate:nil]; */ [...]]]></description>
			<content:encoded><![CDATA[<p>This post will be updated the more I use Objective C.<br />
<span id="more-177"></span><br />
<span style="text-decoration: underline;">Quick UIAlertView</span></p>
<pre class="objc">+<span style="color: #FFF;">&#40;</span><span style="color: #b1b100;">void</span><span style="color: #FFF;">&#41;</span>showPopup:<span style="color: #FFF;">&#40;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> *<span style="color: #FFF;">&#41;</span>title
         message:<span style="color: #FFF;">&#40;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> *<span style="color: #FFF;">&#41;</span>message
     buttonTitle:<span style="color: #FFF;">&#40;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> *<span style="color: #FFF;">&#41;</span>buttonTitle
   popupDelegate:<span style="color: #FFF;">&#40;</span><span style="color: #b1b100;">id</span><span style="color: #FFF;">&#41;</span>popupDelegate
&nbsp;
<span style="color: #FFF;">&#123;</span>
	<span style="color: #666666;">/**
	 * Recreates UIAlertView functionality using 1 line of code:
	 * example:
	 *  #import &quot;Static.h&quot;
	 *  [Static showPopup:@&quot;Error!&quot;
	 *			message:@&quot;You need an internet connection to view this page.&quot;
	 *		buttonTitle:@&quot;OK&quot;
	 *	  popupDelegate:nil];
	 */</span>
	<a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/UIAlertView.html"><span style="color: #0066CC;">UIAlertView</span></a> *openURLAlert = <span style="color: #FFF;">&#91;</span><span style="color: #FFF;">&#91;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/UIAlertView.html"><span style="color: #0066CC;">UIAlertView</span></a> <span style="color: #b1b100;">alloc</span><span style="color: #FFF;">&#93;</span> initWithTitle:title
                        message:<span style="color: #FFF;">&#91;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> stringWithFormat:message<span style="color: #FFF;">&#93;</span>
                        delegate:popupDelegate
                        cancelButtonTitle:buttonTitle
                        otherButtonTitles:<span style="color: #b1b100;">nil</span><span style="color: #FFF;">&#93;</span>;
    <span style="color: #FFF;">&#91;</span>openURLAlert <span style="color: #b1b100;">show</span><span style="color: #FFF;">&#93;</span>;
    <span style="color: #FFF;">&#91;</span>openURLAlert <span style="color: #b1b100;">release</span><span style="color: #FFF;">&#93;</span>;
<span style="color: #FFF;">&#125;</span></pre>
<p><span style="text-decoration: underline;">Checking for NULL</span></p>
<pre class="objc"><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> *myString = <span style="color: #FFF;">&#91;</span><span style="color: #FFF;">&#91;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> <span style="color: #b1b100;">alloc</span><span style="color: #FFF;">&#93;</span> <span style="color: #b1b100;">init</span><span style="color: #FFF;">&#93;</span>;
<span style="color: #b1b100;">if</span> <span style="color: #FFF;">&#40;</span><span style="color: #FFF;">&#91;</span>myString length<span style="color: #FFF;">&#93;</span> &amp;gt; <span style="color: #cc66cc;">0</span><span style="color: #FFF;">&#41;</span> <span style="color: #FFF;">&#123;</span><span style="color: #FFF;">&#125;</span>  <span style="color: #666666;">//check the string's length instead of checking for NULL or nil</span>
&nbsp;</pre>
<p><span style="text-decoration: underline;">Auto-Detect Languages (and iPhone current Language)</span></p>
<pre class="objc"><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSArray.html"><span style="color: #0066CC;">NSArray</span></a> *languages = <span style="color: #FFF;">&#91;</span><span style="color: #FFF;">&#91;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSArray.html"><span style="color: #0066CC;">NSArray</span></a> <span style="color: #b1b100;">alloc</span><span style="color: #FFF;">&#93;</span> initWithArray:<span style="color: #FFF;">&#91;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSLocale.html"><span style="color: #0066CC;">NSLocale</span></a> preferredLanguages<span style="color: #FFF;">&#93;</span><span style="color: #FFF;">&#93;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #FFF;">&#40;</span><span style="color: #b1b100;">id</span> language in languages<span style="color: #FFF;">&#41;</span> <span style="color: #FFF;">&#123;</span>
	<a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSLog.html"><span style="color: #0066CC;">NSLog</span></a><span style="color: #FFF;">&#40;</span>@<span style="color: #666666;">&quot;Language: %@&quot;</span>, language<span style="color: #FFF;">&#41;</span>;
<span style="color: #FFF;">&#125;</span>
<a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSLog.html"><span style="color: #0066CC;">NSLog</span></a><span style="color: #FFF;">&#40;</span>@<span style="color: #666666;">&quot;Default Language: %@&quot;</span>, <span style="color: #FFF;">&#91;</span>languages objectAtIndex:<span style="color: #cc66cc;">0</span><span style="color: #FFF;">&#93;</span><span style="color: #FFF;">&#41;</span>;</pre>
<p><span style="text-decoration: underline;">Auto-Detect Country</span></p>
<pre class="objc"><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSLocale.html"><span style="color: #0066CC;">NSLocale</span></a> *locale = <span style="color: #FFF;">&#91;</span><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSLocale.html"><span style="color: #0066CC;">NSLocale</span></a> currentLocale<span style="color: #FFF;">&#93;</span>;
<a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> *code = <span style="color: #FFF;">&#91;</span>locale objectForKey:NSLocaleCountryCode<span style="color: #FFF;">&#93;</span>;
<a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html"><span style="color: #0066CC;">NSString</span></a> *countryName = <span style="color: #FFF;">&#91;</span>locale displayNameForKey:NSLocaleCountryCode value:code<span style="color: #FFF;">&#93;</span>;
<a href="http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSLog.html"><span style="color: #0066CC;">NSLog</span></a><span style="color: #FFF;">&#40;</span>@<span style="color: #666666;">&quot;country name: %@&quot;</span>, countryName<span style="color: #FFF;">&#41;</span>;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/iphone/objective-c-quick-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xCode practices between multiple developers</title>
		<link>http://blog.tomorrowevening.com/iphone/xcode-practices/</link>
		<comments>http://blog.tomorrowevening.com/iphone/xcode-practices/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 18:26:20 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objectivec]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=172</guid>
		<description><![CDATA[For the past month or so I've been involved with creating 2 iPhone applications at work. I was the sole developer on the first but worked with one other developer on the latter. Seeing as this was our first experiences with xCode and Objective C, there's a few good techniques I'd like to note when [...]]]></description>
			<content:encoded><![CDATA[<p>For the past month or so I've been involved with creating 2 iPhone applications at work. I was the sole developer on the first but worked with one other developer on the latter.  Seeing as this was our first experiences with xCode and Objective C, there's a few good techniques I'd like to note when it comes to organization.<br />
<span id="more-172"></span><br />
First off, when organizing your classes/images/audio/etc files, it's always great to create "Groups" in your xCode's "Groups &amp; Files" panel. When you create your project, you'll notice how the parent folders of your application's name is organized into 5 groups: Classes, Other Sources, Resources, Frameworks, and Products. It's great to keep adding groups as parents of these folders to organize those files.</p>
<p>Changing your files' "Path Type" is also imperative in synchronizing files between multiple developers/computers. To get to the Path Type, right-click (ctrl+click) your file(s) and hit 'Get Info'.<br />
Under the General tab of the pop-up you'll see your Path Type. xCode defaults files to being "Relative to Enclosing Group".<br />
<img src="http://blog.tomorrowevening.com/content/2010/01/before.jpg" alt="" title="before" width="396" height="599" class="alignnone size-full wp-image-173" /></p>
<p>If you're going to organize your files into folders in Finder and then add them into xCode without checking "Copy items into designation group's folder (if needed)", it's imperative to change the Path Type to "Relative to Project". You'll notice the Path under your files' Name will change.<br />
<img src="http://blog.tomorrowevening.com/content/2010/01/after.jpg" alt="" title="after" width="396" height="599" class="alignnone size-full wp-image-174" /></p>
<p>Example: Adding a Default.png image to the application. The image exists in my "Application's folder/images" folder.<br />
Name: Default.png<br />
Path: images/Default.png</p>
<p>This changes the application's start up image so that it doesn't need to be in the same folder as your .xcodeproj file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/iphone/xcode-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
