<?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>iphone.mitchallen.com &#187; Git</title>
	<atom:link href="http://mitchallen.com/iphone/archives/tag/git/feed" rel="self" type="application/rss+xml" />
	<link>http://mitchallen.com/iphone</link>
	<description>random notes on iPhone development</description>
	<lastBuildDate>Tue, 10 Aug 2010 20:36:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>I&#8217;ve updated the UITableView sample</title>
		<link>http://mitchallen.com/iphone/archives/549</link>
		<comments>http://mitchallen.com/iphone/archives/549#comments</comments>
		<pubDate>Fri, 30 Apr 2010 05:43:16 +0000</pubDate>
		<dc:creator>Mitch  Allen</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[UITableView]]></category>

		<guid isPermaLink="false">http://mitchallen.com/iphone/?p=549</guid>
		<description><![CDATA[Since the UITableView sample has been generating a lot of comments (and some frustration), I&#8217;ve posted an update compiled with the latest 3.x SDK: http://mitchallen.com/iphone/archives/184 The update includes a link to a new sample that you can clone from github.]]></description>
			<content:encoded><![CDATA[<p>Since the UITableView sample has been generating a lot of comments (and some frustration), I&#8217;ve posted an update compiled with the latest 3.x SDK:</p>
<p><a href="http://mitchallen.com/iphone/archives/184">http://mitchallen.com/iphone/archives/184</a></p>
<p>The update includes a link to a new sample that you can clone from github.</p>
<p><a href="http://mitchallen.com/iphone/wp-content/uploads/2009/05/Screen-shot-2010-04-29-at-10.36.44-PM.png"><img class="aligncenter size-medium wp-image-547" title="Screen shot 2010-04-29 at 10.36.44 PM" src="http://mitchallen.com/iphone/wp-content/uploads/2009/05/Screen-shot-2010-04-29-at-10.36.44-PM-231x300.png" alt="" width="231" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mitchallen.com/iphone/archives/549/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Project Samples</title>
		<link>http://mitchallen.com/iphone/archives/361</link>
		<comments>http://mitchallen.com/iphone/archives/361#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:16:40 +0000</pubDate>
		<dc:creator>Mitch  Allen</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://mitchallen.com/iphone/?p=361</guid>
		<description><![CDATA[If you scroll to the bottom of my previous post you will notice that I&#8217;ve updated it with a new section: Git Clone If you have git installed, you can clone a copy of this project with the following command: git clone git://github.com/mitchallen/TestGame.git Going forward, I will attempt to post all sample code using git. Usually [...]]]></description>
			<content:encoded><![CDATA[<p>If you scroll to the bottom of my <a href="http://mitchallen.com/iphone/archives/304">previous post</a> you will notice that I&#8217;ve updated it with a new section:</p>
<blockquote>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px;"><strong>Git Clone</strong></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px;">If you have <strong>git</strong> installed, you can clone a copy of this project with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">git clone git://github.com/mitchallen/TestGame.git</pre></div></div>

</blockquote>
<p>Going forward, I will attempt to post all sample code using git.  Usually this means that it will come wrapped in a full Xcode project.</p>
<p>I have several reasons for using git:</p>
<ul>
<li>I don&#8217;t have to wrestle with creating a zip file and uploading it to some obscure server somewhere</li>
<li>You don&#8217;t have to wrestle with downloading a zip file and expanding it somewhere</li>
<li>You don&#8217;t need an account to copy my public repositories</li>
<li>All you have to do is enter one line in a terminal window</li>
<li>You instantly end up with a local copy of the repository that you can copy and branch any which way you like</li>
<li>It forces you to think about source control <img src='http://mitchallen.com/iphone/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>If something is missing, I can just checkin new stuff and do a refresh</li>
<li>If I hack an existing project, I can just add a branch instead of forcing you and I to deal with multiple projects</li>
</ul>
<p>So if you still haven&#8217;t installed <strong>git</strong> on your Mac yet, I suggest you go back and <a href="http://mitchallen.com/iphone/archives/291">read my post on the subject</a> again.  Also if you have, you may want to read it again.  I&#8217;ve added a few more links and info on filtering out certain files to keep your repository from getting cluttered.</p>
]]></content:encoded>
			<wfw:commentRss>http://mitchallen.com/iphone/archives/361/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Source Control with Git</title>
		<link>http://mitchallen.com/iphone/archives/291</link>
		<comments>http://mitchallen.com/iphone/archives/291#comments</comments>
		<pubDate>Fri, 04 Sep 2009 21:11:57 +0000</pubDate>
		<dc:creator>Mitch  Allen</dc:creator>
				<category><![CDATA[source control]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://mitchallen.com/iphone/?p=291</guid>
		<description><![CDATA[Over the years I&#8217;ve worked with many source control management systems (CVS, SVN, SourceSafe, PerForce).   The problem is that they are oriented towards a central server.  Git on the other hand is a new and improved type of source control.  It can work with a server - in fact, it can work with many servers.  But it can [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years I&#8217;ve worked with many source control management systems (CVS, SVN, SourceSafe, PerForce).   The problem is that they are oriented towards a central server.  Git on the other hand is a new and improved type of source control.  It can work with a server - in fact, it can work with many servers.  But it can also work with just your collaborators workstation across the hall &#8211; bypassing the need for a server completely.</p>
<p>If you are just working by yourself (as many iPhone developers are) you can run it on your local workstation &#8211; even without a network connection.  If later you want to make your repository available to others &#8212; or just create an offsite backup &#8212; you can either open up a share on your workstation or clone a repository to a server.</p>
<p>Instead of going into too much detail, I&#8217;m just going to provide links to resources for you to look at.  You can decide for yourself if it is right for you:</p>
<ul>
<li><a href="http://git-scm.com/">Git Home Page</a></li>
<li><a href="http://progit.org/book/">http://progit.org/book/</a> - A free Web-based version of the book <strong>Pro Git</strong>.</li>
<li><a href="http://www.apress.com/book/view/1430218339">Pro Git on Apress</a> &#8211; You can help the author of <strong>Pro Git</strong> out by buying a PDF or hard-copy.</li>
<li><a href="http://code.google.com/p/git-osx-installer/">Git for OS X</a> &#8211; This is what you&#8217;ll need to install it on your Mac.  In my case I had to make sure that I got the latest Intel / Leopard DMG file.</li>
<li><a href="http://dysinger.net/2007/12/30/installing-git-on-mac-os-x-105-leopard/">Installing Git on Leopard</a> &#8211; For the most part you will just want the <strong>Git for OS X</strong> installer &#8211; but see the notes on setting up your config.</li>
<li><a href="http://gitx.frim.nl/">Gitx</a> &#8211; GitX is a git GUI made for Mac OS X</li>
<li><a href="http://docs.heroku.com/git">Heroku tips on Git</a> &#8211; Heroku is a cloud-based host for Rails apps &#8211; but you may find some of the generic tips and links useful.</li>
<li><a href="http://code.google.com/p/msysgit">Windows Installer</a> &#8211; Why would an iPhone developer need a Windows installer?  It could make it easy to trade *.cpp files with your PC.  Plus you can use it for your other projects.  Git is platform independent.</li>
<li><a href="http://github.com/">GitHub.com</a> &#8211; Free hosting for your open source projects.  Paid options also available.</li>
<li><a href="http://unfuddle.com">Unfuddle </a>- Also offers free hosting.  Unlike GitHub, the free plan can be private.</li>
</ul>
<p><strong>Installing on the Mac</strong></p>
<p>When you download <strong><a href="http://code.google.com/p/git-osx-installer/">Git for OS X</a></strong> the DMG file should open up.  Launch the installer.</p>
<p>After installation completes, open up a terminal window and configure it via the command line (substitute your name and e-mail address):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">git config --global user.name &quot;John Doe&quot;
git config --global user.email &quot;john.doe@gmail.com&quot;</pre></div></div>

<p>When that is done type the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">git config --list</pre></div></div>

<p><strong>Ignoring Files</strong></p>
<p>On a PC, you would see several items listed.  On the Mac, apparently you have to set those yourself.  See the link <a href="http://dysinger.net/2007/12/30/installing-git-on-mac-os-x-105-leopard/"><strong>Installing Git on Leopard</strong></a> for what other globals you have to set.  Be sure to configure the ability to use a <strong>.gitignor</strong><strong>e</strong> file for filtering what goes into the repository.</p>
<p>The link suggests that you put your <strong>.gitignore</strong> file in your user directory.  I prefer to put the file in the root of the project.  Yes, it is a hassle to always copy the file from project to project.  But it helps you make sure that whomever else downloads your repository has the right filter too.</p>
<p>So I would configure my globals like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">git config --global core.excludesfile .gitignore</pre></div></div>

<p>For iPhone SDK projects, here is what I have for a .gitignore file:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># xcode noise
build/*
*.xcclassmodel/*
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
&nbsp;
# old skool
.svn
&nbsp;
# osx noise
.DS_Store
profile</pre></div></div>

<p>Here is what I have for <strong>.gitattributes</strong> &#8211; which also sits in the root directory of the project:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">.pbxproj -crlf -diff -merg</pre></div></div>

<p>For more info, see these links:</p>
<p><a style="color: #551a8b;" rel="nofollow" href="http://shanesbrain.net/2008/7/9/using-xcode-with-git" target="_blank">http://shanesbrain.net/2008/7/9/using-xcode-with-git</a></p>
<p><a style="color: #551a8b;" rel="nofollow" href="http://rudifa.wordpress.com/2009/05/19/git-xcode-and-projectlocker/" target="_blank">http://rudifa.wordpress.com/2009/05/19/git-xcode-and-projectlocker/</a></p>
<p><strong>Hidden Files</strong></p>
<p>One thing to note is that when you create a local repository it goes into a subfolder called &#8220;<strong>.git</strong>&#8221; under your projects directory.  On Windows you can see this folder.  It&#8217;s hidden by default on the Mac.  The same is true for <strong>.gitignore</strong> and <strong>.gitattributes</strong>.  If you are in a Terminal window, you can view hidden files using the <strong>-A</strong> flag for <strong>ls</strong>.  Example:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">apple$ ls -l -A</pre></div></div>

<p>If you would like to be able to view hidden files and folders in Finder enter this line from a Terminal window:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">defaults write com.apple.Finder AppleShowAllFiles YES</pre></div></div>

<p>The hidden files won&#8217;t appear until you restart Finder.  For more info, see <a href="http://www.macworld.com/article/51830/2006/07/showallfinder.html">this link</a>. (Note: their steps for restarting Finder didn&#8217;t work for me &#8211; I just rebooted).</p>
<p><strong>Git Hosting</strong></p>
<p>If you do decide to setup a Git server, it can be a bit of work.  To get around that problem at work I just use file shares.  The good thing about Git is that it can refer to a server based reposiory either via http:// or file:/// (example:  file:///\\mywinsever\git\myproject.git &#8211; note that there are three slashes after &#8220;file:&#8221; ).  If that makes no sense to you now, don&#8217;t worry.  It will once you come up to speed.</p>
<p>If you want to share your project with the world, hosts like <a href="http://github.com/">GitHub.com</a> and <a href="http://unfuddle.com">Unfuddle</a> can also save you a lot of work.   These sites are new and suffer from a lack of documentation.  But if you don&#8217;t mind being on the bleeding edge you may find them useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://mitchallen.com/iphone/archives/291/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing the display size of a UITableView</title>
		<link>http://mitchallen.com/iphone/archives/184</link>
		<comments>http://mitchallen.com/iphone/archives/184#comments</comments>
		<pubDate>Tue, 26 May 2009 21:11:27 +0000</pubDate>
		<dc:creator>Mitch  Allen</dc:creator>
				<category><![CDATA[Interface Builder]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[tables]]></category>
		<category><![CDATA[UITableView]]></category>
		<category><![CDATA[UITableViewController]]></category>
		<category><![CDATA[UIViewController]]></category>
		<category><![CDATA[views]]></category>

		<guid isPermaLink="false">http://mitchallen.com/iphone/?p=184</guid>
		<description><![CDATA[UPDATE 29-Apr-2010: By popular demand, here is a git repository with an updated sample: git clone git@github.com:mitchallen/TableSize2.git Note that I have NOT updated the code in this post. Look at the repository for the new code. This new sample fixes two issues: missing IBOutlet and the deprecated setText method on the cell. To see how [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 29-Apr-2010:</strong></p>
<p>By popular demand, here is a git repository with an updated sample:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">git clone git@github.com:mitchallen/TableSize2.git</pre></div></div>

<p>Note that I have NOT updated the code in this post.  Look at the repository for the new code.  This new sample fixes two issues:  missing IBOutlet and the deprecated setText method on the cell.</p>
<p>To see how it looks in &#8220;boxed&#8221; mode on the iPad, set the compiler to: Simulator &#8211; 3.2 | Debug.</p>
<p><a href="http://mitchallen.com/iphone/wp-content/uploads/2009/05/Screen-shot-2010-04-29-at-10.36.44-PM.png"><img class="alignnone size-medium wp-image-547" title="Screen shot 2010-04-29 at 10.36.44 PM" src="http://mitchallen.com/iphone/wp-content/uploads/2009/05/Screen-shot-2010-04-29-at-10.36.44-PM-231x300.png" alt="" width="231" height="300" /></a></p>
<hr size="1" /><strong>ORIGINAL POST</strong></p>
<p>Here is an example of how to create a view that contains a <strong>UITableView</strong> that doesn&#8217;t take over the whole screen.  An example of an application that uses a small table is the <strong>Stocks</strong> application that comes with the iPhone / iPod Touch.  You may think you need a <strong>UITableViewController</strong> &#8211; but that only gets in the way and takes over the view.</p>
<ul>
<li>Create a View-based iPhone application and call it <strong><em>TableSize1</em></strong></li>
<li>Modify <strong><em>TableSize1ViewController.h</em></strong> so that it looks like this:</li>
</ul>
<p><strong>TableSize1ViewController.h</strong></p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  TableSize1ViewController.h</span>
<span style="color: #11740a; font-style: italic;">//  TableSize1</span>
<span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  Created by Mitchell Allen on 5/26/09.</span>
<span style="color: #11740a; font-style: italic;">//  Copyright __MyCompanyName__ 2009. All rights reserved.</span>
<span style="color: #11740a; font-style: italic;">//</span>
&nbsp;
<span style="color: #6e371a;">#import </span>
&nbsp;
<span style="color: #a61390;">@interface</span> TableSize1ViewController <span style="color: #002200;">:</span> UIViewController <span style="color: #002200;">&#123;</span>
&nbsp;
	UITableView <span style="color: #002200;">*</span>tableView;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>retain, nonatomic<span style="color: #002200;">&#41;</span> UITableView <span style="color: #002200;">*</span>tableView;
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<ul>
<li>Modify <strong><em>TableSize1ViewController.m</em></strong> so that it looks like this:</li>
</ul>
<p><strong>TableSize1ViewController.m</strong></p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  TableSize1ViewController.m</span>
<span style="color: #11740a; font-style: italic;">//  TableSize1</span>
<span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  Created by Mitchell Allen on 5/26/09.</span>
<span style="color: #11740a; font-style: italic;">//  Copyright __MyCompanyName__ 2009. All rights reserved.</span>
<span style="color: #11740a; font-style: italic;">//</span>
&nbsp;
<span style="color: #6e371a;">#import &quot;TableSize1ViewController.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@implementation</span> TableSize1ViewController
&nbsp;
<span style="color: #a61390;">@synthesize</span> tableView;
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>viewDidLoad <span style="color: #002200;">&#123;</span>
&nbsp;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>numberOfSectionsInTableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView <span style="color: #002200;">&#123;</span>
&nbsp;
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">1</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView numberOfRowsInSection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>section <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">20</span>;  <span style="color: #11740a; font-style: italic;">// Test hack to display multiple rows.</span>
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UITableViewCell <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView cellForRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSIndexPath</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath <span style="color: #002200;">&#123;</span>
&nbsp;
    <span style="color: #a61390;">static</span> <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>CellIdentifier <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cell&quot;</span>;
&nbsp;
    UITableViewCell <span style="color: #002200;">*</span>cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self.tableView dequeueReusableCellWithIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>cell <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UITableViewCell alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span>CGRectZero reuseIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>szCell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> alloc<span style="color: #002200;">&#93;</span> initWithFormat<span style="color: #002200;">:</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Row %i&quot;</span>, indexPath.row <span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #002200;">&#91;</span>cell setText<span style="color: #002200;">:</span>szCell<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #002200;">&#91;</span>szCell release<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Set up the cell</span>
    <span style="color: #a61390;">return</span> cell;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView didSelectRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSIndexPath</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath <span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// Navigation logic -- create and push a new view controller</span>
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>didReceiveMemoryWarning <span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>super didReceiveMemoryWarning<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">// Releases the view if it doesn't have a superview</span>
    <span style="color: #11740a; font-style: italic;">// Release anything that's not essential, such as cached data</span>
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>dealloc <span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>super dealloc<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<ul>
<li>In the <strong>Resources</strong> folder, double-click <strong>TableSize1ViewController.xib</strong> to launch <strong>Interface Builder</strong></li>
<li>From <strong>Library / Cocoa Touch Plugin / Data Views</strong> drag a <strong>Table View</strong> on to the <strong>View</strong> and make it about half the height of the view (Select <strong>Tools / Library</strong> from the main menu if it isn&#8217;t visible)</li>
<li>Click on the new <strong>Table View</strong></li>
<li>Click on the second tab in the <strong>Inspector</strong> window (Select <strong>Tools / Inspector</strong> from the main menu if it isn&#8217;t visible)</li>
<li>After clicking the second tab, the title of the <strong>Inspector</strong> window should be <strong>Table View Connections</strong></li>
<li>Under <strong>Outlets</strong>: for both <strong>dataSource</strong> and <strong>delegate</strong>, drag the mouse from the circles next to them to the <strong>File&#8217;s Owner</strong> icon in the <strong>TableSize1ViewController.xib</strong> window.</li>
<li>Under <strong>Referencing Outlets</strong>: drag from <strong>New Referencing Outlet</strong> to the <strong>File&#8217;s Owner</strong> icon and select <strong>tableView</strong>.</li>
<li>With <strong>Interface Builder</strong> in focus, select <strong>File / Save</strong></li>
<li>Go back to your project window and click <strong>Build and Go</strong></li>
<li>Your application should now display a table that only takes up half the screen.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mitchallen.com/iphone/archives/184/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>
