<?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; ViewBase application in iPad</title>
	<atom:link href="http://www.edumobile.org/iphone/tag/viewbase-application-in-ipad/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>ViewBase application in iPad</title>
		<link>http://www.edumobile.org/iphone/ipad-development/viewbase-application-in-ipad/</link>
		<comments>http://www.edumobile.org/iphone/ipad-development/viewbase-application-in-ipad/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 07:43:21 +0000</pubDate>
		<dc:creator>Sushant</dc:creator>
				<category><![CDATA[iPad Development]]></category>
		<category><![CDATA[iPad tutorials]]></category>
		<category><![CDATA[ViewBase application]]></category>
		<category><![CDATA[ViewBase application in iPad]]></category>

		<guid isPermaLink="false">http://www.edumobile.org/iphone/?p=2443</guid>
		<description><![CDATA[This is the simple View Base application. In this application we will display image,  button and label.]]></description>
			<content:encoded><![CDATA[<p>This is the simple View Base application. In this application we will display image,  button and label.</p>
<p><strong>Step 1: </strong>Create a View base application using template. Give the application name &#8220;ViewBase_iPad&#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 ViewBase_iPadViewController class for you. Expand Resources and notice the template generated a separate nib,ViewBase_iPadViewController.xib, for the “ViewBase_iPad”.</p>
<p><strong>Step 4:</strong> In the ViewBase_iPadViewController.h file, we have created instance of UILabel and UIImage class. Define one IBAction method. So make the following changes.</p>
<div class="codesnip-container" >
<div class="objc codesnip" style="font-family:monospace;"><span class="co1">#import &lt;UIKit/UIKit.h&gt;</span></p>
<p><span class="kw1">@interface</span> ViewBase_iPadViewController <span class="sy0">:</span> UIViewController <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp;IBOutlet UILabel <span class="sy0">*</span>myLabel;<br />
&nbsp;IBOutlet UIImage <span class="sy0">*</span>myImage;</p>
<p><span class="br0">&#125;</span></p>
<p><span class="kw1">@property</span><span class="br0">&#40;</span>nonatomic,retain<span class="br0">&#41;</span> IBOutlet UILabel <span class="sy0">*</span>myLabel;<br />
<span class="kw1">@property</span><span class="br0">&#40;</span>nonatomic,retain<span class="br0">&#41;</span> IBOutlet UIImage <span class="sy0">*</span>myImage;</p>
<p><span class="sy0">-</span><span class="br0">&#40;</span>IBAction<span class="br0">&#41;</span>ButtonPressed<span class="sy0">:</span><span class="br0">&#40;</span><span class="kw4">id</span><span class="br0">&#41;</span>sender;</div>
</div>
<p><strong>Step 5:</strong> Double click the ViewBase_iPadViewController.xib file and open it to the Interface Builder.First drag the Image View from the library and place it to the View window. Next drag label and Round Rect from the library and place it to the view window. Select the Round Rect from the view window and bring up Connection iNspector. Drag from the Touch Up Inside to the File&#8217;s Owner icon and select ButtonPressed: method. Connect File&#8217;s Owner icon to the View icon and select view and connect File&#8217;s Owner icon to the label select myLabel. Now save the ViewBase_iPadViewController.xib file, close it and go back to the Xcode.</p>
<p><strong>Step 6:</strong> Open the ViewBase_iPadViewController.m file and make the following changes in the file.</p>
<div class="codesnip-container" >
<div class="objc codesnip" style="font-family:monospace;"><span class="sy0">-</span><span class="br0">&#40;</span>IBAction<span class="br0">&#41;</span>ButtonPressed<span class="sy0">:</span><span class="br0">&#40;</span><span class="kw4">id</span><span class="br0">&#41;</span>sender<span class="br0">&#123;</span></p>
<p>myLabel.text <span class="sy0">=</span> <span class="co3">@</span><span class="st0">&quot;Welocome to the Real World!!!&quot;</span>;<br />
<span class="br0">&#125;</span></div>
</div>
<p><strong>Step 7:</strong> Now compile and run the application in the Simulator.</p>
<p><a href="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/1-73.jpg"><img src="http://www.edumobile.org/iphone/wp-content/uploads/2010/07/1-73-232x300.jpg" alt="" title="1-7" width="232" height="300" class="alignnone size-medium wp-image-2444" /></a></p>
<p>You can <strong>Download SourceCode</strong> from here <a href='http://www.edumobile.org/iphone/wp-content/uploads/2010/07/ViewBase_iPad.zip'>ViewBase_iPad</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edumobile.org/iphone/ipad-development/viewbase-application-in-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

