<?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 Tutorial &#124; iPhone iOS4 iPad SDK Development &#38; Programming Blog &#187; Hello World with Navigation Base</title>
	<atom:link href="http://www.edumobile.org/iphone/tag/hello-world-with-navigation-base/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edumobile.org/iphone</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 11:17:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hello World with Navigation Base application in iPhone</title>
		<link>http://www.edumobile.org/iphone/iphone-programming-tutorials/hello-world-with-navigation-base-application-in-iphone/</link>
		<comments>http://www.edumobile.org/iphone/iphone-programming-tutorials/hello-world-with-navigation-base-application-in-iphone/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:42:14 +0000</pubDate>
		<dc:creator>Sushant</dc:creator>
				<category><![CDATA[iPhone Programming Tutorials]]></category>
		<category><![CDATA[Hello World with Navigation Base]]></category>
		<category><![CDATA[Hello World with Navigation Base application in iPhone]]></category>
		<category><![CDATA[iphone tutorials]]></category>

		<guid isPermaLink="false">http://www.edumobile.org/iphone/?p=2434</guid>
		<description><![CDATA[This is the very simple example. In this example we will see how to Hello iPhone display using navigation base application.]]></description>
			<content:encoded><![CDATA[<p>This is the very simple example. In this example we will see how to Hello iPhone display using navigation base application.</p>
<p><strong>Step 1:</strong> Create a Navigation Base application using template. Give the application name &#8220;HelloWorld_NavigationBase&#8221;.</p>
<p><strong>Step 2:</strong> Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore the directory structure to check out the content of the directory.</p>
<p><strong>Step 3:</strong> Xpand classes and notice Interface Builder created the RootViewController class for you (See the figure below). Expand Resources and notice the template generated a separate nib,RootViewController.xib, for the “HelloWorld_NavigationBase”.</p>
<p><a href="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/1-72.jpg"><img class="alignnone size-medium wp-image-2435" title="1-7" src="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/1-72-184x300.jpg" alt="" width="184" height="300" /></a></p>
<p><strong>Step 4:</strong> Open the RootViewController.m file, for this example we need to add only two lines of code in this file . So make the changes.</p>
<div class="codesnip-container" >
<div class="objc codesnip" style="font-family:monospace;"><span class="sy0">-</span> <span class="br0">&#40;</span><span class="kw4">void</span><span class="br0">&#41;</span>viewDidLoad <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="br0">&#91;</span>super viewDidLoad<span class="br0">&#93;</span>;</p>
<p><span class="co2">// Uncomment the following line to display an Edit button in the navigation bar for this view controller.</span><br />
&nbsp; &nbsp; &nbsp;self.navigationItem.rightBarButtonItem <span class="sy0">=</span> self.editButtonItem;<br />
<span class="br0">&#125;</span></p>
<p>&nbsp; <span class="sy0">-</span> <span class="br0">&#40;</span>UITableViewCell <span class="sy0">*</span><span class="br0">&#41;</span>tableView<span class="sy0">:</span><span class="br0">&#40;</span>UITableView <span class="sy0">*</span><span class="br0">&#41;</span>tableView &nbsp; cellForRowAtIndexPath<span class="sy0">:</span><span class="br0">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSIndexPath_Class/"><span class="kw5">NSIndexPath</span></a> <span class="sy0">*</span><span class="br0">&#41;</span>indexPath <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp;<span class="kw4">static</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span class="kw5">NSString</span></a> <span class="sy0">*</span>CellIdentifier <span class="sy0">=</span> <span class="co3">@</span><span class="st0">&quot;Cell&quot;</span>;</p>
<p>&nbsp; &nbsp;UITableViewCell <span class="sy0">*</span>cell <span class="sy0">=</span> <span class="br0">&#91;</span>tableView &nbsp;dequeueReusableCellWithIdentifier<span class="sy0">:</span>CellIdentifier<span class="br0">&#93;</span>;<br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>cell <span class="sy0">==</span> <span class="kw2">nil</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp;cell <span class="sy0">=</span> <span class="br0">&#91;</span><span class="br0">&#91;</span><span class="br0">&#91;</span>UITableViewCell alloc<span class="br0">&#93;</span> &nbsp; initWithStyle<span class="sy0">:</span>UITableViewCellStyleDefault reuseIdentifier<span class="sy0">:</span>CellIdentifier<span class="br0">&#93;</span> &nbsp; &nbsp;autorelease<span class="br0">&#93;</span>;<br />
<span class="br0">&#125;</span></p>
<p>&nbsp; <span class="co2">// Configure the cell. // added below two line</span><br />
&nbsp; &nbsp; <span class="br0">&#91;</span><span class="br0">&#91;</span>cell textLabel<span class="br0">&#93;</span> setTextAlignment<span class="sy0">:</span>UITextAlignmentCenter<span class="br0">&#93;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#91;</span>cell.textLabel setText<span class="sy0">:</span><span class="co3">@</span><span class="st0">&quot;Hello iPhone!&quot;</span><span class="br0">&#93;</span>;</p>
<p>&nbsp; &nbsp;<span class="kw1">return</span> cell;<br />
<span class="br0">&#125;</span></div>
</div>
<p><strong>Step 5:</strong> Now compile and run the application in the Simulator.</p>
<p><a href="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/2-41.jpg"><img class="alignnone size-medium wp-image-2436" title="2-4" src="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/2-41-170x300.jpg" alt="" width="170" height="300" /></a></p>
<p>You can <strong>Download SourceCode</strong> from here <a href="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/HelloWorld_NavigationBase.zip">HelloWorld_NavigationBase</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edumobile.org/iphone/iphone-programming-tutorials/hello-world-with-navigation-base-application-in-iphone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

