<?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/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>How to Make iPhone Apps</title>
	<atom:link href="http://howtomakeiphoneapps.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://howtomakeiphoneapps.com</link>
	<description>Explore the iOS SDK and make your own iPhone apps</description>
	<lastBuildDate>Fri, 03 Feb 2012 21:18:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<copyright>Copyright © Mobile App Mastery 2011 </copyright>
	<managingEditor>matt@mobileappmastery.com (MattjDrake)</managingEditor>
	<webMaster>matt@mobileappmastery.com (MattjDrake)</webMaster>
	<category>podcast</category>
	<ttl>1440</ttl>
	<image>
		<url>http://howtomakeiphoneapps.com/wp-content/uploads/2011/10/MAM_Logo_Square_No_Words.png</url>
		<title>How to Make iPhone Apps</title>
		<link>http://howtomakeiphoneapps.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle>This Week In App Development</itunes:subtitle>
	<itunes:summary>Explore the iOS SDK and make your own iPhone apps.  Each week I&#039;ll go over stuff that you can use to get up to speed as an iOS app developer so you can make your own iPhone and iPad apps.</itunes:summary>
	<itunes:keywords>iphone, training, iphone, programming, objective-c, iphone, ipad, ios, ios, development, programming, apple</itunes:keywords>
	<itunes:category text="Technology">
		<itunes:category text="Software How-To" />
	</itunes:category>
	<itunes:category text="Technology">
		<itunes:category text="Gadgets" />
	</itunes:category>
	<itunes:category text="Arts">
		<itunes:category text="Design" />
	</itunes:category>
	<itunes:author>MattjDrake</itunes:author>
	<itunes:owner>
		<itunes:name>MattjDrake</itunes:name>
		<itunes:email>matt@mobileappmastery.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://howtomakeiphoneapps.com/wp-content/uploads/2011/10/MAM_Logo_Square_No_Words.png" />
		<item>
		<title>Format Dates In Objective-C With NSDate + NSDateFormatter</title>
		<link>http://howtomakeiphoneapps.com/format-dates-in-objective-c-with-nsdate-nsdateformatter/1659/</link>
		<comments>http://howtomakeiphoneapps.com/format-dates-in-objective-c-with-nsdate-nsdateformatter/1659/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 21:20:22 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Code Tips]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1659</guid>
		<description><![CDATA[Anyone who uses NSDate knows that the output format can be pretty unpleasant looking. This output is not something that you would generally present to your users. So what is an Objective-C programmer to do with dates? The answer is to use NSDateFormatter to create date formats and get data objects formatted as strings that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2012/02/ipad-calendar.jpg"><img class="alignleft size-thumbnail wp-image-1661" title="ipad-calendar" src="http://howtomakeiphoneapps.com/wp-content/uploads/2012/02/ipad-calendar-150x150.jpg" alt="" width="150" height="150" /></a>Anyone who uses NSDate knows that the output format can be pretty unpleasant looking. This output is not something that you would generally present to your users. So what is an Objective-C programmer to do with dates?</p>
<p>The answer is to use <span style="font-weight: bold; color: #3366ff;">NSDateFormatter</span> to create date formats and get data objects formatted as strings that you can present to your users.</p>
<p>You will specify date formatter dates using the <a href="http://unicode.org/reports/tr35/tr35-10.html#Date_Format_Patterns">Unicode data format patterns</a>. So, let&#8217;s assume for the moment that you have today&#8217;s date set up:</p>
<pre>NSDate *todaysDate = [NSDate date];</pre>
<p>If you want to present this you would do something like this but with your own UI:</p>
<pre>NSDate *todaysDate = [NSDate date];

<span style="font-weight: bold; color: #3366ff;">NSLog(@"Today's date is %@", todaysDate);</span></pre>
<p>The output would look like this if you did it right now with me:</p>
<pre>Today's date is 2012-02-02 21:10:57 +0000</pre>
<p>That&#8217;s not all that pretty is it?</p>
<p>But, let&#8217;s bring the date formatter into the picture so you can see how to get some control over this output. We can simple create a new date formatter using <span style="font-weight: bold; color: #3366ff;">NSDateFormatter </span>. Then we can specify any date format that we want.</p>
<pre>NSDate *todaysDate = [NSDate date];

NSLog(@"Today's date is %@", todaysDate);
<span style="font-weight: bold; color: #3366ff;"> NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.dateFormat = @"EEEE, MMMM d"; </span></pre>
<p>Now, check out the output:</p>
<pre>Today's date (formatted) is Thursday, February 2</pre>
<p>Pretty cool right? So, I choose to output the date in a particular way but you can do whatever you want here. See the <a href="http://unicode.org/reports/tr35/tr35-10.html#Date_Format_Patterns">Unicode date format pattern reference</a> to get more formats that you can use.</p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/format-dates-in-objective-c-with-nsdate-nsdateformatter/1659/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>February Going Ons (Mobile App Mastery Newsletter)</title>
		<link>http://howtomakeiphoneapps.com/february-going-ons-mobile-app-mastery-newsletter/1655/</link>
		<comments>http://howtomakeiphoneapps.com/february-going-ons-mobile-app-mastery-newsletter/1655/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 20:12:22 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1655</guid>
		<description><![CDATA[So I&#8217;ve been trying to get myself to publish a monthly newsletter for Mobile App Mastery and this blog for some time. But, as you will find out in a second I&#8217;ve been extremely busy with a sweet semi-secret project. But, at any rate here is my attempt to update you on the tons of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/newsletter-omg.jpg"><img src="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/newsletter-omg-150x150.jpg" alt="" title="newsletter-omg" width="150" height="150" class="alignleft size-thumbnail wp-image-1656" /></a>So I&#8217;ve been trying to get myself to publish a monthly newsletter for Mobile App Mastery and this blog for some time.  But, as you will find out in a second I&#8217;ve been extremely busy with a sweet semi-secret project.  But, at any rate here is my attempt to update you on the tons of exciting things going on for the month of February.</p>
<h3>Huge Improvements To iOS Code Camp!</h3>
<p>iOS Code Camp is my exclusive online training seminar.  iOS Code Camp is an intensive training program plus live mentoring, coaching and community building delivered by yours truly via BaseCamp and GoToMeeting.  This is where programmers go to learn iOS development as quickly as possible.</p>
<p>Last year, we did great with the 3 three intensive boot camp style iOS Code Camp.  But, this time around I&#8217;m going to increase iOS Code Camp to six weeks (that&#8217;s twice as long!) and change the structure a bit to keep everyone even more focused on getting the coding &#8220;meat memory&#8221; down pat.</p>
<h4>Mark Your Calendar for March 12th!</h4>
<p>The next iOS Code Camp will start March 12th and go on for 6 weeks.  Keep an eye on the How to Make iPhone Apps Blog, Mobile App Mastery Institute or on the newsletter mailing list to find out when registration opens.  Remember seating is limited so I can give you the attention that you deserve.</p>
<h3>Big Semi-Secret Project</h3>
<p>Many of you might be wondering why my Twitter feed has been relatively quiet (with the exception of some timely observations about the constant Yo Gabba Gabba and Thomas the Train episodes my two year old insists on watching)&#8230;</p>
<p>Well &#8211; I&#8217;ve been working on a huge new book with a new publisher, APress.  APress is a big time publisher and I&#8217;m very excited to be working with them on this book.  While I don&#8217;t want to say much yet about the book (I&#8217;m not really sure what I can say actually) &#8211; I will say that the topic is iOS and Mac programming and you may find it useful as you move how this iOS app developer roadmap.  The book will be published in the summer if everything goes right.  Wish me luck!</p>
<h3>That Wraps It Up For Now!</h3>
<p>Remember, keep an eye out for iOS Code Camp if you are looking for a new career or direction or want to start your own software business.  March 12th!  Now, I gotta run back to my book!</p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/february-going-ons-mobile-app-mastery-newsletter/1655/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Philosophy Can Help You Learn Programming</title>
		<link>http://howtomakeiphoneapps.com/how-philosophy-can-help-you-learn-programming/1602/</link>
		<comments>http://howtomakeiphoneapps.com/how-philosophy-can-help-you-learn-programming/1602/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:59:43 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Editorial]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1602</guid>
		<description><![CDATA[As an undergraduate, I took a liberal arts course that really changed my thinking about programming. If you can believe it, this course was a philosophy course! This course is what brought everything into focus and made me into the programmer that I am today. What Course Was That? The course was Symbolic Logic and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/philospher.jpg"><img src="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/philospher-150x150.jpg" alt="" title="Socrates" width="150" height="150" class="alignleft size-thumbnail wp-image-1607" /></a>As an undergraduate, I took a liberal arts course that really changed my thinking about programming.  If you can believe it, this course was a philosophy course!  This course is what brought everything into focus and made me into the programmer that I am today.</p>
<p>What Course Was That?</p>
<p>The course was <strong>Symbolic Logic</strong> and it was simply a course that showed use the fundamental ways to figure out logic problems.  Honestly, the entire class really boiled down to this:</p>
<p><span style="font-style:italic;font-weight:bold;color: #3366ff;"><br />
If A = B and B = C then A = C<br />
</span></p>
<p>In the class, we would go over tons of situations and reduce them to logic statements written down on paper in pretty much the form you see above (but usually they started out more complicated).  This process of breaking problems down into abstract statements that can be evaluated is what the study of logic is all about.</p>
<p>There was something about learning logic in this way, in its pure form, that really made a lot of sense.  Really, </p>
<blockquote><p>the lesson I learned here is that you need to learn how to solve problems before you can attempt to program a computer to solve problems.</p></blockquote>
<h3>What Does This Mean For You?</h3>
<p>If you are early on your path to becoming a programmer and feel frustrated and perhaps distracted by all the glitz of the Objective-C iOS Mac Foundation programming world then you may need to get back to basics.  My thought for you today is that you take a detour and learn about pure logic.  Take some time to train your brain up in logical reasoning.</p>
<h3>How To Train In Symbolic Logic?</h3>
<p>The class I took in my university was all lectures, slides and handouts so I don&#8217;t have a great book recommendation.  However, I would suggest looking up a course on logic at your own university or local community college.  An alternative could be this book I found at Amazon: <a href="http://www.amazon.com/gp/product/B000FC1TGW/ref=as_li_ss_tl?ie=UTF8&#038;tag=mattj-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B000FC1TGW">Being Logical: A Guide to Good Thinking</a>.</p>
<h3>Do You Have Any Good Book Recommendations For Learning About Logic?</h3>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/how-philosophy-can-help-you-learn-programming/1602/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Comparing Strings With NSString In Objective-C</title>
		<link>http://howtomakeiphoneapps.com/comparing-strings-with-nsstring-in-objective-c/1594/</link>
		<comments>http://howtomakeiphoneapps.com/comparing-strings-with-nsstring-in-objective-c/1594/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 13:31:36 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Code Tips]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1594</guid>
		<description><![CDATA[Many people, when they are first starting with Objective-C and iOS want to be able to compare strings in if-then statements and things like that. It seems natural to try to write something like: NSString *string1 = @"A"; NSString *string2 = @"B"; if(string1 == string2) //do something else //or not NOTE: ^ the code above [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/apples-oranges.jpg"><img src="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/apples-oranges-150x150.jpg" alt="" title="Which one?" width="150" height="150" class="alignleft size-thumbnail wp-image-1600" /></a>Many people, when they are first starting with Objective-C and iOS want to be able to compare strings in if-then statements and things like that.  It seems natural to try to write something like:</p>
<pre>NSString *string1 = @"A";
NSString *string2 = @"B";

if(string1 == string2)
     //do something
else
     //or not
</pre>
<p>NOTE: ^ the code above will not work&#8230;</p>
<p>But, that doesn&#8217;t work because strings are objects and if you want to compare strings you will need to use the <span style="font-weight:bold;color: #3366ff;">NSString</span> object methods that Apple has made available to you.</p>
<h3>Testing For Equality With NSString</h3>
<p>Most likely, you just want to see if your string is equal to another string.  This is something that you can use in an if-then statement to direct the flow of your program.  To do this you must use <span style="font-weight:bold;color: #3366ff;">isEqualToString:</span> function.  This is something you send to the first string using the second string as a parameter.  The result comes back as a <span style="font-weight:bold;color: #3366ff;">BOOL </span>(<span style="font-weight:bold;color: #3366ff;">YES</span> or <span style="font-weight:bold;color: #3366ff;">NO</span>) that you can evaluate.</p>
<p>See the example below:</p>
<pre>NSString *myString1 = @"A";
NSString *myString2 = @"B";
NSString *myString3 = @"A";

BOOL isEqual = [myString1 isEqualToString:myString2];

if(isEqual)
     NSLog(@"%@ is equal to %@", myString1, myString2);
else
     NSLog(@"%@ is not equal to %@", myString1, myString2);
</pre>
<h3>Looking For Prefixes and Suffixes</h3>
<p><span style="font-weight:bold;color: #3366ff;">NSString </span>also has two really convenient functions that you can use to find out if a string is at the beginning or end of your string.  These two functions are called <span style="font-weight:bold;color: #3366ff;">hasPrefix: </span>and <span style="font-weight:bold;color: #3366ff;">hasSuffix: </span>respectively.</p>
<p>Check these out here:</p>
<pre>
NSString *name = @"Mr. John Smith, MD";

BOOL hasMrPrefix = [name hasPrefix:@"Mr"];

if(hasMrPrefix)
     NSLog(@"%@ has the Mr prefix", name);
else
     NSLog(@"%@ doesn't have the Mr prefix", name);

BOOL hasMDSuffix = [name hasSuffix:@"MD"];

if(hasMDSuffix)
     NSLog(@"%@ has the MD suffix", name);
else
     NSLog(@"%@ doesn't have the MD suffix", name);</pre>
</pre>
<h3>Comparing Substrings With NSString</h3>
<p>Finally, you can also compare substrings with the NSString function <span style="font-weight:bold;color: #3366ff;">substringWithRange: </span>.  The first thing that you do is define an <span style="font-weight:bold;color: #3366ff;">NSRange </span> with the starting point and length of the string that you are interested in.  Then you can use the first string's <span style="font-weight:bold;color: #3366ff;">substringWithRange: </span>function to extract the substring.  Once you do this you can use the same comparison methods as we just discussed.</p>
<p>Here is an example of that in action:</p>
<pre>
NSString *alphabet = @"ABCDEFGHIJKLMONPQRSTUVWXYZ";

NSRange range = NSMakeRange(2, 3);

BOOL lettersInRange = [[alphabet substringWithRange:range] isEqualToString:@"CDE"];

if(lettersInRange)
     NSLog(@"The letters CDE are in alphabet starting at position 2");
else
     NSLog(@"The letters CDE aren't in alphabet starting at position 2");
</pre>
<p>So, that's it for comparing strings with NSString in Objective-C.  <strong>Any thoughts or other ideas to help people to work with strings?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/comparing-strings-with-nsstring-in-objective-c/1594/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add And Subtract Dates In Objective-C</title>
		<link>http://howtomakeiphoneapps.com/add-and-subtract-dates-in-objective-c/1585/</link>
		<comments>http://howtomakeiphoneapps.com/add-and-subtract-dates-in-objective-c/1585/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 15:12:56 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Code Tips]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1585</guid>
		<description><![CDATA[Here is the problem: your app works with dates and you would like to be able to find out what day came a week before, or is coming up in two years.  There are a few ways to do this but the easiest by far is to use your user&#8217;s calendar along with the NSDateComponents [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/calendar-date-pages.jpg"><img src="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/calendar-date-pages-150x150.jpg" alt="" title="Flip Desktop Callendar Pages" width="150" height="150" class="alignleft size-thumbnail wp-image-1591" /></a>Here is the problem: your app works with dates and you would like to be able to find out what day came a week before, or is coming up in two years.  There are a few ways to do this but the easiest by far is to use your user&#8217;s calendar along with the <span style="font-weight: bold; color: #3366ff;">NSDateComponents</span> Foundation class to figure out precisely what these date relationships are.</p>
<h3>Get Today&#8217;s Date In Objective-C</h3>
<p>Before we go any further, let&#8217;s make sure we are on the same page and can get a reference to today&#8217;s date. Oh yeah, we&#8217;ll call that day <span style="font-style: italic; font-weight: bold; color: #3366ff;">today</span>.</p>
<pre>NSDate *today = [NSDate date];</pre>
<p>What you can do is create a new <span style="font-weight: bold; color: #3366ff;">NSDateComponents</span> object and then specify the amount of time that you would like to add or subtract from your date.</p>
<pre>NSDate *today = [NSDate date];
<span style="font-weight: bold; color: #3366ff;">NSDateComponents *dateComponents = [[NSDateComponents alloc] init];
dateComponents.week = -1;
dateComponents.day = -3;</span></pre>
<p>Now to get the date for one week and three days ago I need to get a reference to my system calendar first:</p>
<pre>NSCalendar *calendar = [NSCalendar currentCalendar];</pre>
<p>Then I can use the NSCalendar function <span style="font-weight:bold;color: #3366ff;">dateByAddingComponents:toDate:options: </span> to get the date from a week and three days ago.</p>
<pre>
NSDate *today = [NSDate date];

NSDateComponents *dateComponents = [[NSDateComponents alloc] init];

dateComponents.week = -1;
dateComponents.day = -3;

NSCalendar *calendar = [NSCalendar currentCalendar];
    <span style="font-weight:bold;color: #3366ff;">
NSDate *previousDate = [calendar dateByAddingComponents:dateComponents
                                                 toDate:today
                                                options:0];
</span></pre>
<p>To see the results of the subtraction above write out the two date objects to the log.</p>
<pre>
NSDate *today = [NSDate date];

NSDateComponents *dateComponents = [[NSDateComponents alloc] init];

dateComponents.week = -1;
dateComponents.day = -3;

NSCalendar *calendar = [NSCalendar currentCalendar];

NSDate *previousDate = [calendar dateByAddingComponents:dateComponents
                                                 toDate:today
                                                options:0];

<span style="font-weight:bold;color: #3366ff;">NSLog(@"Today is %@ and a week and three days ago it was %@", today, previousDate);</span>
</pre>
<p>You will see something like this appear in your console screen:</p>
<pre>Today is 2012-01-19 15:10:12 +0000 and a week and three days ago it was 2012-01-09 15:10:12 +0000</pre>
<h3>So What Do You Think?</h3>
<p>Have you had any luck with this method of adding and subtracting dates in Objective-C?</p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/add-and-subtract-dates-in-objective-c/1585/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Compiling Mac Apps With ARC From Terminal</title>
		<link>http://howtomakeiphoneapps.com/compiling-mac-apps-with-arc-from-termina/1580/</link>
		<comments>http://howtomakeiphoneapps.com/compiling-mac-apps-with-arc-from-termina/1580/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:30:53 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Code Tips]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1580</guid>
		<description><![CDATA[The other day, I was looking around for a simple way to just compile a text file for a simple Mac app.  This isn&#8217;t something that you would do everyday but there are times when it&#8217;s nice to have the simplest bit of code out there without all the fuss involved with the XCode templates [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/women-mac-screen.jpg"><img class="alignleft size-thumbnail wp-image-1583" title="women-mac-screen" src="http://howtomakeiphoneapps.com/wp-content/uploads/2012/01/women-mac-screen-150x150.jpg" alt="" width="150" height="150" /></a>The other day, I was looking around for a simple way to just compile a text file for a simple Mac app.  This isn&#8217;t something that you would do everyday but there are times when it&#8217;s nice to have the simplest bit of code out there without all the fuss involved with the XCode templates and everything else.</p>
<h2>Write Objective-C Code Using Arc From Any Text Editor</h2>
<p>So, check out this code I wrote just with a text editor (no XCode at all):</p>
<pre>#import &lt;Foundation/Foundation.h&gt;
int main (int argc, const char * argv[]){
 	@autoreleasepool {
		NSString *helloString = @"Hello World";
		NSLog(@"%@", helloString);
	}
	return 0;
}</pre>
<p>It&#8217;s pretty refreshing to actually see the entire program here and in just one place without any fussy extras attached. You can test many Objective-C Foundation procedures like this.</p>
<p>Note that we are going to use ARC to compile here and that is why I can use the <span style="font-weight: bold; color: #3366ff;">@autorelease</span> keyword. If you are not using ARC then you may need to use the older <span style="font-weight: bold; color: #3366ff;">NSAutoreleasePool</span> instead.</p>
<h2>Compile Mac Code From Terminal With ARC Using Clang</h2>
<p>You can use the command clang to compile the code above. XCode will do something similar for you in the background, but its nice to see the general format. Here is what you would type into Terminal to compile your Mac app:</p>
<pre>clang -fobjc-arc -framework Foundation main.m -o maccommandlineapp</pre>
<p>Here is what all this stuff means: <span style="font-weight: bold; color: #3366ff;">clang</span> is the compiler that you must use if you want ARC. <span style="font-weight: bold; color: #3366ff;">-fobjc-arc</span> lets the compiler know that we intend to use ARC for memory management. <span style="font-weight: bold; color: #3366ff;">-framework Foundation</span> is linking us to the Foundation framework so we can import that into our Mac code and use Objective-C classes. <span style="font-weight: bold; color: #3366ff;">main.m</span> is the code file that you are compiling and <span style="font-weight: bold; color: #3366ff;">-o maccommandlineapp</span> specifies the output file.</p>
<h2>How To Use Your Compiled Mac Program</h2>
<p>Make sure that you are in the folder where you located your code file and compiled your program. Then, simply type in <span style="font-weight: bold; color: #3366ff;">open maccommandlineapp</span>. You will see the output in the Terminal window.</p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/compiling-mac-apps-with-arc-from-termina/1580/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Do You Want To Know About iPhone, iPad &amp; iOS Development?</title>
		<link>http://howtomakeiphoneapps.com/what-do-you-want-to-know-about-iphone-ipad-ios-development/1572/</link>
		<comments>http://howtomakeiphoneapps.com/what-do-you-want-to-know-about-iphone-ipad-ios-development/1572/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 15:50:45 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Editorial]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1572</guid>
		<description><![CDATA[Today, I want to try something new.  Usually, I blog about what&#8217;s going on in the mobile app development world or I write up tutorials about how to do the latest whiz-bang iOS code trick.  But today, I&#8217;m curious to know what&#8217;s going on in your head out there. So &#8211; I am doing this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/what-question.jpg"><img class="alignleft size-thumbnail wp-image-1573" title="what-question" src="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/what-question-150x150.jpg" alt="" width="150" height="150" /></a>Today, I want to try something new.  Usually, I blog about what&#8217;s going on in the mobile app development world or I write up tutorials about how to do the latest whiz-bang iOS code trick.  But today, I&#8217;m curious to know what&#8217;s going on in your head out there.</p>
<p>So &#8211; I am doing this post not to impart any great secrets from behind the iOS curtain. I&#8217;m curious about what YOU as a reader curious about iOS app development are looking for.  Take a second to think about it and just respond to this post with a question.  I&#8217;ll do my best to answer it or link you to a resource that will answer better than I can.</p>
<p><strong>Ok, so What Do You Want To Know About iPhone, iPad &amp; iOS Development?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/what-do-you-want-to-know-about-iphone-ipad-ios-development/1572/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Cool iOS Design Resources</title>
		<link>http://howtomakeiphoneapps.com/cool-ios-design-resources/1569/</link>
		<comments>http://howtomakeiphoneapps.com/cool-ios-design-resources/1569/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 15:41:54 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1569</guid>
		<description><![CDATA[Most programmers and software developers need a bit of help when it comes to the idea of design.  Am I wrong?  We get caught up, rightly so usually, in the notion of how to get things done.  Implementation is our speciality. But, guess what?  Design is an important part of the development process. Here are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/Blue-Paint-Guy.jpg"><img class="alignleft size-thumbnail wp-image-1570" title="3d blue painter" src="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/Blue-Paint-Guy-150x150.jpg" alt="" width="150" height="150" /></a>Most programmers and software developers need a bit of help when it comes to the idea of <em>design</em>.  Am I wrong?  We get caught up, rightly so usually, in the notion of how to get things done.  Implementation is our speciality.</p>
<p>But, guess what?  Design is an important part of the development process. Here are some resources that you can explore to get just a little bit of help.  Note: some of these resources are affiliates if they happen to have an affilate program.</p>
<h2>iOS Designer Resources</h2>
<p>Mobile apps <em>require</em> nice interfaces, icons and overall design. Programming is only part of the task in developing an app. Here are some trainings and other types of resources about mobile app design.</p>
<p><strong><a href="http://www.appdesignvault.com/dap/a/?a=45&amp;p=http://www.appdesignvault.com/launch/bonus-theme/">The Vault</a></strong> - here you can get some pre-made app themes crafted by Tope who has recently authored some guest posts on this blog about customizing your table view cells and tab bars.  This is a way to fast forward and practically outsource your design process on the cheap.</p>
<p>price: $47-$140 (affiliate)</p>
<p><strong><a href="http://www.mobilepatterns.com/">Mobile Patterns</a></strong> -  a website about mobile designs so you can use this as a source of inspiration about your own mobile app designs.<br />
price: free</p>
<p><strong><a href="http://glyphish.com/">Glyphish</a></strong> - nifty icons that you can use in your tab bar and toolbars.<br />
price: $29</p>
<p><strong><a href="http://click.linksynergy.com/fs-bin/stat?id=FgN2V3dTXaM&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fomnigraffle-pro%252Fid404645717%253Fmt%253D12%2526uo%253D4%2526partnerId%253D30">OmniGraffle </a></strong>- this is a storyboarding system that helps you design iOS apps and also other constructs like flow charts. Available for <a href="http://click.linksynergy.com/fs-bin/stat?id=FgN2V3dTXaM&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fomnigraffle-pro%252Fid404645717%253Fmt%253D12%2526uo%253D4%2526partnerId%253D30">Mac</a>and <a href="http://click.linksynergy.com/fs-bin/stat?id=FgN2V3dTXaM&amp;offerid=146261&amp;type=3&amp;subid=0&amp;tmpid=1826&amp;RD_PARM1=http%253A%252F%252Fitunes.apple.com%252Fus%252Fapp%252Fomnigraffle-for-ipad%252Fid363225984%253Fmt%253D8%2526uo%253D4%2526partnerId%253D30">iPad</a>.<br />
price: $49 for iPad, $199 for Mac (affiliate)</p>
<p><strong><a href="http://www.tapptics.com/member/go.php?r=38&amp;i=l0">Tapptics</a></strong> - if you want to completely customize your app&#8217;s graphics Jen from Tappics can help you out. Her product includes 100&#8242;s of design files, tutorials on using graphics programs to make UI elements and programming tutorials for customizing UI. She throws in some marketing and outsourcing tips as well.</p>
<p>price: $97-$597 (affiliate)</p>
<p><strong>Do you have any great design resources to add to this collection?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/cool-ios-design-resources/1569/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction To Core Graphics For iOS Apps</title>
		<link>http://howtomakeiphoneapps.com/introduction-to-core-graphics-for-ios-apps/1562/</link>
		<comments>http://howtomakeiphoneapps.com/introduction-to-core-graphics-for-ios-apps/1562/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 15:16:55 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[Code Tips]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1562</guid>
		<description><![CDATA[We get a lot for free when we are composing apps for the iPhone and iPad.  Stunning graphics.   Flowing animations. But, there are times when you want to move list a little bit past the built in graphics and animations that iOS comes with.  You have some options to put your own little touch [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/Artist-Palate.jpg"><img class="alignleft size-thumbnail wp-image-1563" title="Artist-Palate" src="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/Artist-Palate-150x150.jpg" alt="" width="150" height="150" /></a>We get a lot <em>for free</em> when we are composing apps for the iPhone and iPad.  Stunning graphics.   Flowing animations.</p>
<p>But, there are times when you want to move list a little bit past the built in graphics and animations that iOS comes with.  You have some options to put your own little touch into your app: you can change the style of your app using <span style="font-weight:bold;color: #3366ff;">UIAppearance </span>Protocol, you can add custom colors and graphics to your navigation bars, tab bars, toolbars and table views and you can even draw stuff directly unto your views.</p>
<h3>How To Draw Your Own Stuff With Core Graphics</h3>
<p>Core Graphics is the system used by iOS to draw vector-like graphics on views.  This is low level programming and expect to be doing lots of defining low level graphic entities like lines, circles and squares if you want to dip into this layer of iOS programming.</p>
<h4>Here is a quick way to test out using core graphics:</h4>
<h5>Subclass <span style="font-weight:bold;color: #3366ff;">UIView </span></h5>
<pre>#import &lt;UIKit/UIKit.h>

@interface CGView : UIView {

}

@end</pre>
<h4>Override <span style="font-weight:bold;color: #3366ff;">- (void)drawRect:(CGRect)rect; </span>.<br />
<h4>
<p>This is the <span style="font-weight:bold;color: #3366ff;">UIView </span>method responsible for drawing the view.</p>
<h4>Add Core Graphics Code</h4>
<pre>#import "CGView.h"

@implementation CGView
<span style="font-weight:bold;color: #3366ff;">
- (void)drawRect:(CGRect)rect {
        //Get the CGContext from this view
        CGContextRef context = UIGraphicsGetCurrentContext();
        //Set the stroke (pen) color
        CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
        //Set the width of the pen mark
        CGContextSetLineWidth(context, 5.0);

        // Draw a line
        //Start at this point
        CGContextMoveToPoint(context, 10.0, 30.0);

        //Give instructions to the CGContext
        //(move "pen" around the screen)
        CGContextAddLineToPoint(context, 100.0, 30.0);
        CGContextAddLineToPoint(context, 100.0, 90.0);
        CGContextAddLineToPoint(context, 10.0, 90.0);

        //Draw it
        CGContextStrokePath(context);

        //Draw a rectangle
        CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor);
        //Define a rectangle
        CGContextAddRect(context, CGRectMake(10.0, 150.0, 60.0, 120.0));
        //Draw it
        CGContextFillPath(context);
}
</span>

@end</pre>
<h4>Add This View To A SubView<br />
<h4>
<p>You can now add this view to a container like a view controller, the app&#8217;s window or as an embedded view on a view controller.  For example, to stick the view above into your app&#8217;s window you can do this:</p>
<pre>#import "AppDelegate.h"
<span style="font-weight:bold;color: #3366ff;">#import "CGView.h" </span>

@implementation AppDelegate
@synthesize window;

//Use this method to add code to test out in this project.  Each
//type of code will follow the pattern set in the examples below.
- (void)applicationDidFinishLaunching:(UIApplication *)application {
<span style="font-weight:bold;color: #3366ff;">
        [window addSubview:[[CGView alloc] initWithFrame:window.frame]];
</span>
        // Override point for customization after application launch
        [window makeKeyAndVisible];
}

@end</pre>
<p><strong>Can you think of anything you might want to do with Core Graphics?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/introduction-to-core-graphics-for-ios-apps/1562/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Twitter Support To Your iPhone App In 5 Steps</title>
		<link>http://howtomakeiphoneapps.com/add-twitter-support-to-your-iphone-app-in-5-steps/1558/</link>
		<comments>http://howtomakeiphoneapps.com/add-twitter-support-to-your-iphone-app-in-5-steps/1558/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 18:01:23 +0000</pubDate>
		<dc:creator>MattjDrake</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://howtomakeiphoneapps.com/?p=1558</guid>
		<description><![CDATA[Do you know how easy it is to give your users Twitter support in your app. This works like the email function in iOS apps &#8211; you will be able to present your user with a model view that is pre-populated with content that will become a tweet that will appear in your user&#8217;s timeline. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/twitter-01.png"><img src="http://howtomakeiphoneapps.com/wp-content/uploads/2011/12/twitter-01.png" alt="" title="twitter-01" width="48" height="48" class="alignleft size-full wp-image-1559" /></a>Do you know how easy it is to give your users Twitter support in your app. This works like the email function in iOS apps &#8211; you will be able to present your user with a model view that is pre-populated with content that will become a tweet that will appear in your user&#8217;s timeline.</p>
<p>This is what you need to do to add Twitter support to your iOS app:</p>
<ul>
<li>Add Twitter framework</li>
<li>Import Twitter.h</li>
<li>Instantiate TWTweetComposeViewController</li>
<li>Set initial text, images and URLs</li>
<li>Present TWTweetComposeViewController in a model view controller</li>
</ul>
<p>Here is an <span style="font-weight:bold;color: #3366ff;">IBAction </span>that I coded that implements this Twitter functionality.</p>
<pre>-(IBAction)tweetTweet:(id)sender {
    NSLog(@"%i", [TWTweetComposeViewController canSendTweet]);
    TWTweetComposeViewController *tweeter = [[TWTweetComposeViewController alloc] init];
    [tweeter setInitialText:self.myTextField.text];
    [self presentModalViewController:tweeter animated:YES];
}</pre>
<p><strong>Cool huh?  What do you think?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://howtomakeiphoneapps.com/add-twitter-support-to-your-iphone-app-in-5-steps/1558/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

