<?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>Liz Arum&#039;s Blog</title>
	<atom:link href="http://blog.lizarum.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lizarum.com</link>
	<description>I teach tech and share it</description>
	<lastBuildDate>Tue, 03 Nov 2009 16:42:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Button Fun</title>
		<link>http://blog.lizarum.com/2009/11/button-fun/</link>
		<comments>http://blog.lizarum.com/2009/11/button-fun/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 16:42:17 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=182</guid>
		<description><![CDATA[This was my example. When you clicked the button, the face appeared and a sound file of a scream played.
I also suggested, to help students understand the interaction, that they could start with a picture of an animal, like a pig. If you clicked the tail, the image should change and a squeal should play.
iPhone [...]]]></description>
			<content:encoded><![CDATA[<p>This was my example. When you clicked the button, the face appeared and a sound file of a scream played.<br />
I also suggested, to help students understand the interaction, that they could start with a picture of an animal, like a pig. If you clicked the tail, the image should change and a squeal should play.<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/surprise.gif" alt="surprise" title="surprise" width="200" height="388" class="alignright size-full wp-image-189" /></p>
<h2>iPhone Project with buttons and sound</h2>
<ol>
<li>Create a background image</p>
<p></li>
<li>Create a foreground image
<p></li>
<li>Create an icon image 57 x 57px
<p></li>
<li>Find a sound. Open the sound in Audacity and save as 32-bit sound.
<p></li>
<li>Open <strong>XCode</strong>
<p></li>
<li>Create a <strong>ViewBased </strong>Project
<p></li>
<li>Add the images and the sound
<p></li>
<li>Update the <strong>plist</strong> file
<p></li>
<li>Add a framework by CTRL+clicking on <strong>Frameworks</strong>. Select <strong>Existing Frameworks</strong> and add <strong>AudioToolbox.framework</strong><br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/add_framework-554x600.png" alt="add_framework" title="add_framework" width="554" height="600" class="alignright size-medium wp-image-183" />
<p></li>
<li>Open the header file
<p></li>
<li>Create a statement that imports the <strong>AudioToolbox/AudioToolbox.h</strong>
<p></li>
<li>Add 3 <strong>IBOutlets</strong>. One to hold a <strong>UILabel </strong>and the other two to hold pointers of type <strong>UIImageView</strong>
<p></li>
<li>Create a pointer of type <strong>NSTimer</strong> and name it <strong>resetTimer</strong>
<p></li>
<li>Create a a variable named sound of type <strong>SystemSoundID</strong>
<p></li>
<li>Create 3 <strong>@property</strong> declarations for the label and the <strong>UIImageViews</strong>
<p></li>
<li>Create a buttonPressed <strong>IBAction</strong> that takes sender of type id as its parameter.
<p></li>
<li>Open the implementation file
<p></li>
<li><strong>@synthesize</strong> the properties
<p></li>
<li>Define the <strong>buttonPressed</strong> method:
<div class="box7">
<ol>
<li>Set the <strong>text</strong> of your label to your message
<p></li>
<li>Create a pointer named <strong>foregroundImg</strong> of type <strong>UIImage</strong> and set it to the <strong>UIImage</strong> method <strong>imageNamed</strong> with the name of your foreground image as your parameter
<p></li>
<li>Set the <strong>image</strong> of the <strong>UIImageView</strong> that will pop up, to be the variable you just created (foregroundImg)
<p></li>
<li>Set the <strong>hidden</strong> property of that <strong>UIImageView</strong> to <strong>NO</strong>
<p></li>
<li>Test if <strong>sound</strong> and
<p>if the condition is met, then call:<br />
<code>AudioServicesPlaySystemSound(sound);<br />
</code></p>
<p></li>
<li>Test if <strong>resetTimer</strong> does NOT equal <strong>nil</strong>
<p>If the condition is met, then call:<br />
<code>[resetTimer invalidate];<br />
</code></p>
<p></li>
<li>Now set <strong>resetTimer</strong> to<br />
<code>resetTimer = [NSTimer scheduledTimerWithTimeInterval:1.1 target:self selector:@selector(resetImages:) userInfo:nil repeats:NO];<br />
</code></p>
</li>
</ol>
</div>
<p></li>
<li>Now you have to define the method you just called (<strong>resetImages</strong>)
<p><code><br />
- (void)resetImages:(NSTimer *)sender{</p>
<p>}</code></li>
<li>Inside the method:
<div class="box7">
<ol>
<li>Set the  <strong>hidden</strong> property of the <strong>UIImageView</strong> that pops up to <strong>YES</strong></p>
<p></li>
<li>Empty the label.
<p></li>
<li>Set <strong>resetTimer</strong> to <strong>nil</strong>
</li>
</ol>
</div>
<p></li>
<li>Navigate to and uncomment <strong>viewDidLoad</strong>
<p></li>
<li>After the call to super, include these lines (remember to update the name of your audio file):<br />
<code><br />
 CFBundleRef mainBundle = CFBundleGetMainBundle();<br />
	CFURLRef soundUrlRef = CFBundleCopyResourceURL(mainBundle, CFSTR ("aaaah2"), CFSTR ("wav"), NULL);</p>
<p>	// Create a system sound object representing the sound file<br />
    AudioServicesCreateSystemSoundID (soundUrlRef,  &amp;sound);<br />
    </code></p>
<p></li>
<li>Open the nib file and add a<strong> UIImageView </strong>
<p></li>
<li>Using the inspector set it to hold your background image
</li>
<li>Add a label
<p></li>
<li>Add a button<br />
<a href="http://blog.lizarum.com/wp-content/uploads/2009/11/bgImage.png"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/bgImage.png" alt="bgImage" title="bgImage" width="200" height="313"  size-full wp-image-185" /></a></p>
<p></li>
<li>Add another <strong>UIImageView</strong> and align it with the <strong>bottom</strong><br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/11/bottom.png" alt="bottom" title="bottom" width="400" height="327"  size-full wp-image-186" /></p>
<p></li>
<li>Connect The <strong>File Owner </strong>to label and select label<br />
    <img src="http://blog.lizarum.com/wp-content/uploads/2009/11/to_label.png" alt="to_label" title="to_label" width="400" height="106"  size-full wp-image-190" /></p>
<p></li>
<li>Connect the button to the <strong>File Owner</strong> and select <strong>buttonPressed</strong><br />
   <img src="http://blog.lizarum.com/wp-content/uploads/2009/11/btn.png" alt="btn" title="btn" width="400" height="154" size-full wp-image-187" /></p>
<p></li>
<li>Connect the <strong>File Owner</strong> to the <strong>UIImageView </strong> aligned to the bottom and select the name holding the <strong>UIImageView</strong> that pops up<br />
  <img src="http://blog.lizarum.com/wp-content/uploads/2009/11/imageView.png" alt="imageView" title="imageView" width="400" height="335"  size-full wp-image-188" /></p>
<p></li>
</ol>
<p>
This project was inspired by <a href="http://www.rorylewis.com/docs/02iPhone/05_iPhoneTutorials.htm">Rory Lewis&#8217;s tutorials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/11/button-fun/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some early projects</title>
		<link>http://blog.lizarum.com/2009/11/some-early-projects/</link>
		<comments>http://blog.lizarum.com/2009/11/some-early-projects/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 03:55:57 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[iPhone Programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=177</guid>
		<description><![CDATA[Physical Computing
Here are a few of the recently completed projects:
FSR and LEDs
A soft circuit button and LEDs
Potentiometer controlled LEDs with 2 modes controlled by a button
FSR controlled spooky eyes
A few other interesting projects are in the works. Two involve the capacitive sensor. The first uses a hacked disposable digital camera that flashes when the sensor [...]]]></description>
			<content:encoded><![CDATA[<h2>Physical Computing</h2>
<p>Here are a few of the recently completed projects:<a href="http://blog.lizarum.com/wp-content/uploads/2009/11/P1120064.JPG"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/P1120064-600x450.jpg" alt="P1120064" title="P1120064" width="600" height="450" class="alignnone size-medium wp-image-176" /></a><br />
FSR and LEDs</p>
<p><a href="http://blog.lizarum.com/wp-content/uploads/2009/11/Movie.jpg"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/Movie-600x450.jpg" alt="Movie" title="Movie" width="600" height="450" class="alignnone size-medium wp-image-178" /></a>A soft circuit button and LEDs</p>
<p><a href="http://blog.lizarum.com/wp-content/uploads/2009/11/light4.png"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/light4.png" alt="light4" title="light4" width="260" height="210" class="alignnone size-full wp-image-179" /></a><br />Potentiometer controlled LEDs with 2 modes controlled by a button</p>
<p><a href="http://blog.lizarum.com/wp-content/uploads/2009/11/img3.png"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/img3.png" alt="img3" title="img3" width="288" height="384" class="alignnone size-full wp-image-180" /></a><br />FSR controlled spooky eyes</p>
<p>A few other interesting projects are in the works. Two involve the capacitive sensor. The first uses a hacked disposable digital camera that flashes when the sensor is triggered. The second project was created as a Halloween installation. I hope there were pictures! </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/11/some-early-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Short Week</title>
		<link>http://blog.lizarum.com/2009/10/a-short-week/</link>
		<comments>http://blog.lizarum.com/2009/10/a-short-week/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 13:01:43 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Blender]]></category>
		<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[iPhone Programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=161</guid>
		<description><![CDATA[I finished my soft circuit. Now when you pet it it purrs and flashes its eyes. I added a homemade capacitance sensor and a vibrating motor. I started with this information, but ended up using Paul Badger&#8217;s CapacitiveSense003 library which worked great. My circuit uses a 2.2M&#937; resistor to  connect pins 2 and 5 [...]]]></description>
			<content:encoded><![CDATA[<p>I finished my soft circuit. Now when you pet it it purrs and flashes its eyes. I added a homemade capacitance sensor and a vibrating motor. I started with t<a href="http://www.bytecraft.com/Touch_Sensitive_Switch">his information</a>, but ended up using Paul Badger&#8217;s<a href="http://www.arduino.cc/playground/Main/CapSense"> CapacitiveSense003</a> library which worked great. My circuit uses a 2.2M&Omega; resistor to  connect pins 2 and 5 and the sensor itself is made of conductive frabric from <a href="http://www.lessemf.com/">LessEMF</a>. The piece came from the Fabric Sample Set (Cat. #SAMPLER) and I cut in in half and connected it to pin 2 through conductive thread and a 22 AWG hookup wire. </p>
<p>Here&#8217;s the code:<br />
<br />
<code>#include <CapSense.h><br />
const int purr = 9;        // pin that the LED is attached to<br />
const int led = 3;        // pin that the LED is attached to<br />
const int eye1=10;<br />
const int eye2=11;<br />
const int mouth=4;<br />
boolean purring=false;<br />
boolean openEyes=false;<br />
CapSense   cs_1_2 = CapSense(1,2); </p>
<p>void setup(){<br />
  pinMode(purr, OUTPUT);<br />
  pinMode(led, OUTPUT);<br />
  pinMode(eye1, OUTPUT);<br />
  pinMode(eye2, OUTPUT);<br />
  pinMode(mouth, INPUT);<br />
  pinMode(led,OUTPUT);  </p>
<p>  pinMode(purr,OUTPUT);<br />
  digitalWrite(purr, LOW);<br />
  Serial.begin(9600);<br />
}</p>
<p>int touch_sensor(){<br />
  long start = millis();<br />
    long total1 =  cs_1_2.capSense(30);<br />
if (total1<02){<br />
  return 1;<br />
}else{<br />
  return 0;<br />
}</p>
<p>    /*Serial.print(millis() - start);        // check on performance in milliseconds<br />
    Serial.print("\t");                    // tab character for debug windown spacing</p>
<p>    Serial.print(total1);                  // print sensor output 1<br />
            // print sensor output 3</p>
<p>    delay(10); */<br />
}</p>
<p>void loop(){<br />
  int touch=touch_sensor();<br />
 if (digitalRead(mouth)){<br />
  openEyes=true;<br />
  }<br />
  else{<br />
    openEyes=false;<br />
  }</p>
<p>  if(!touch){<br />
 if(purring){<br />
      for(int i=255;i> 0;i-=10){<br />
        analogWrite(purr,i);<br />
        delay(20);<br />
      }</p>
<p>      purring=false;<br />
    }<br />
    else{<br />
      analogWrite(purr,0);<br />
      openEyes=false;<br />
    }<br />
    digitalWrite(led,LOW);</p>
<p>  }<br />
  else{<br />
    purring=true;<br />
    digitalWrite(led,HIGH);</p>
<p>    analogWrite(purr,200);<br />
      openEyes=true;</p>
<p>  }<br />
if (openEyes){<br />
   for(int i=65;i<255;i+=10){<br />
      analogWrite(eye1,i);<br />
      analogWrite(eye2,i);<br />
      delay(10);<br />
    }<br />
    for(int i=255;i>65;i-=10){<br />
      analogWrite(eye1,i);<br />
      analogWrite(eye2,i);<br />
      delay(10);<br />
    }}else{<br />
      analogWrite(eye1,0);<br />
    analogWrite(eye2,0);<br />
    }<br />
}<br />
</code><br />
<br />
Students worked on their own soft circuits this week with different enthusiasm levels. Students used to working through labs, but not producing pieces, enjoyed this assignment  far less than those who like to make crafts. Still, I believe introducing students to conductive thread and conductive fabrics will help them construct later projects.</p>
<p>We did run into a few glitches this week as well. One student plugged 12V into the freeduino. The 12V plug was used in our first experiments, and I had mentioned that the freeduino could be powered by the USB or a battery. I had extra Atmega chips and, apart from the chip, the board seemed fine.</p>
<p> Another student had trouble finding the usbserial port. At first I thought that the <strong>FTDI Drivers for Intel Macs</strong> was not installed, but then he moved to another computer with the same problem. His circuit seemed fine. In the end, it turned out that the USB cable was to blame. As soon as we switched cables, everything worked. It was a brand new cable and it surprised both of us that this was the source of the problems.</p>
<p>IPhone programming is going a bit slower than I anticipated. The class was still working on the second version of the Browser assignment this week. In the meantime, I came up with a way for students to create web pages to document their work:<br />
   <script src="http://lizarum.com/assignments/includes/codegen.js" type="text/javascript"></script></p>
<form id="mycode" method="post" action="#">
<div style="text-align:right;">
<input type="button" value="clear fields" onclick="clearFields();return true;"  />
<hr /></div>
<p></p>
<div style="black 1px solid; ">Background-color:<br /><textarea   id="bg"  rows="1" cols="40"></textarea><br />
Application name:<br /><textarea   id="ApTitle"  rows="1" cols="40"></textarea><br />
<hr />
Notes:<br /><textarea   id="notes"  rows="6" cols="40"></textarea><br />
<hr />
File Name:<br /><textarea   id="fileName"  rows="1" cols="40"></textarea><br />
<br />
Code:<br /><textarea   id="code"  rows="10" cols="40"></textarea></p>
<input type="button" value="Add code with code generator" onclick="pickOne();return true;" />
&nbsp;<br />
<span id="newpage"></span></p>
<p style="text-align:right;">
<input type="button"  id="preview" value="Page Preview" onclick="makePage()"  style="display:none;" /></p>
</div>
</form>
<p>The Blender class is going well. Students have started working with armatures and materials. They have made short quicktime movies of the experiments and everyone is still engaged in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/10/a-short-week/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A cute soft circuit project</title>
		<link>http://blog.lizarum.com/2009/10/a-cute-soft-circuit-project/</link>
		<comments>http://blog.lizarum.com/2009/10/a-cute-soft-circuit-project/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 18:55:59 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[Soft Circuits]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=146</guid>
		<description><![CDATA[Here&#8217;s a soft circuit with 2 LEDs and a button. It is basically an electronic sock puppet.
I used a sock covered in a knitted bag. The button is a sewing snap. When the mouth closes, the button returns a 1 and the LEDs flicker.

Here&#8217;s the code
#define btn 4
#define led1 3
#define led2 9
int btnState;
void setup(){
  [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a soft circuit with 2 LEDs and a button. It is basically an electronic sock puppet.</p>
<p>I used a sock covered in a knitted bag. The button is a sewing snap. When the mouth closes, the button returns a 1 and the LEDs flicker.</p>
<p><object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="640"<br />
        height="850" codebase='http://www.apple.com/qtactivex/qtplugin.cab'><param name='src' value="../../images/keyframes/your_mov_name.MOV"><param name='autoplay' value="true"><param name='controller' value="true"><param name='loop' value="true"><embed src="http://blog.lizarum.com/wp-content/uploads/2009/10/puppet1.mov" width="320" height="255" autoplay="false"<br />
        controller="true" loop="false" pluginspage='http://www.apple.com/quicktime/download/'></embed></object></p>
<p>Here&#8217;s the code</p>
<p><code>#define btn 4<br />
#define led1 3<br />
#define led2 9<br />
int btnState;</p>
<p>void setup(){<br />
  pinMode(led1,OUTPUT);<br />
   pinMode(led2,OUTPUT);<br />
  pinMode(btn,INPUT);</p>
<p>}</p>
<p>void loop(){<br />
btnState=digitalRead(btn);<br />
if(btnState){<br />
      for(int i=50;i<255;i+=5){<br />
        analogWrite(led1,i);<br />
          analogWrite(led2,i);<br />
        delay(10);<br />
      }<br />
       for(int i=255;i>100;i-=5){<br />
        analogWrite(led1,i);<br />
          analogWrite(led2,i);<br />
        delay(10);<br />
      }<br />
}else{<br />
   digitalWrite(led1,LOW);<br />
   digitalWrite(led2,LOW);<br />
}<br />
      Serial.println(digitalRead(btn));<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/10/a-cute-soft-circuit-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://blog.lizarum.com/wp-content/uploads/2009/10/puppet1.mov" length="431587" type="video/quicktime" />
		</item>
		<item>
		<title>iPhone Browser</title>
		<link>http://blog.lizarum.com/2009/10/iphone-browser/</link>
		<comments>http://blog.lizarum.com/2009/10/iphone-browser/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 18:45:13 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Teaching]]></category>
		<category><![CDATA[iPhone Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Web Browser]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=133</guid>
		<description><![CDATA[Perhaps the most typical network task performed by many network
applications is to load a web page.
The functionality of
Safari’s WebKit engine is available to you in the form of the UIWebView.
What we did
Created an application that loaded web pages.


Open Xcode:

Create a new Project (&#8984;+&#8679;+N). Make it a View-based
Application


Name it Browser

Open BrowserViewController.h and add pointers for IBOutlets
for [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps the most typical network task performed by many network<br />
applications is to load a web page.</p>
<p>The functionality of<br />
Safari’s WebKit engine is available to you in the form of the <strong>UIWebView</strong>.</p>
<h4>What we did</h4>
<p><strong>Created an application that loaded web pages.</strong><br />
</p>
<ol>
<li>Open <strong>Xcode</strong>:
<p></li>
<li>Create a new Project (&#8984;+&#8679;+N). Make it a <strong>View-based<br />
Application</strong><br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/10/view_based.png" alt="view_based" title="view_based" width="600" height="443" class="alignnone size-full wp-image-136" /></p>
<p></li>
<li>
Name it <strong>Browser</strong></p>
<p></li>
<li>Open <strong>BrowserViewController.h</strong> and add pointers for <strong>IBOutlets</strong><br />
for <strong>urlField</strong> (a UITextField) and <strong>webView</strong> (a UIWebView).</p>
<p></li>
<li> This application brings up the keyboard. You will<br />
be managing a text field and you will want to <strong>dismiss the keyboard</strong> when the user either clicks a done button or presses <strong> return</strong>. </p>
<p>To dismiss the keyboard, you need to tell the text field to give up its role<br />
as the <strong>first responder</strong>, meaning the component that initially receives<br />
the user input.<br />
<code>[nameField resignFirstResponder];</code></p>
<p>If you look up the documentation for <strong>UITextField</strong>, you’ll see that it has a delegate property<br />
that is defined by the <strong>UITextFieldDelegate</strong> protocol, a defined group of<br />
related methods. <br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/10/UItextFieldDelegate_doc.png" alt="UItextFieldDelegate_doc" title="UItextFieldDelegate_doc" width="565" height="272" class="alignnone size-full wp-image-135" /></p>
<p>Look up this protocol and you’ll see it has numerous<br />
methods that alert the delegate of events relating to the text field. One<br />
of them is <strong>textFieldShouldReturn</strong>, which looks like what you need in order<br />
to know when the user has tapped return.</p>
<p>Add<br />
the <strong>UITextFieldDelegate</strong> protocol declaration too. </p>
<p><code><br />
@interface BrowserViewController : UIViewController <strong>&lt;UITextFieldDelegate&gt;</strong>{</p>
<p></code></p>
<p></li>
<li>Add an instance<br />
method to handle the clicking of the <strong>go</strong> button. It will be of type <strong>IBAction</strong> Name it  <strong>handleGoTapped</strong>.Pass it <strong>(id)sender</strong></p>
<p>Instance methods follow the closed curly brace and precede the @end </li>
<li>Open the <strong>BrowserViewController</strong> nib in <strong>IB</strong> and create the User Interface.
<ul>
<li>A textField</li>
<li>A webView</li>
<li>A GO button</li>
</ul>
<p>
Add a <strong>Placeholder</strong> in the textField so that the user knows to type <strong>http://</strong> and set the keyboard to URL (&#8984;+1)</p>
<p></li>
<li>Make the connections.<br />
(control-click the text field to expose its outlets, and connect<br />
its <strong>Delegate</strong> to <strong>File&#8217;s Owner</strong>.)</p>
<p></li>
<li>Open up <strong>BrowserViewController.m</strong>. You&#8217;ll need to define the method to get the URL from<br />
the text field and have the web view load that site; this method will be<br />
called when the user clicks the <strong>Go</strong> button or when they hit <strong>Return</strong><br />
on the pop-up keyboard.</p>
<p>When the go button is pressed:</p>
<ol>
<li>Close the keyboard by calling <strong>resignFirstResponder</strong> on <strong><br />
urlField</strong></p>
</li>
<li>Call <strong>loadURL</strong> on <strong>self</strong></li>
</ol>
<p></li>
<li>To create the <strong>loadURL </strong>method
<ol>
<li>
Create a pointer named <strong>url</strong> of type<strong> NSURL </strong>and set it to:</p>
<p><code>[[NSURL alloc] initWithString: urlField.text]</code></p>
</li>
<li>Create a pointer named <strong>request<br />
</strong> of type <strong>NSURLRequest</strong> and set it to <br />
<code>[[NSURLRequest alloc] initWithURL: url]</code></p>
</li>
<li>Call <strong>loadRequest</strong> on <strong>webView</strong> and pass it <strong>request</strong>
</li>
<li>Release <strong>request</strong>
</li>
<li>
Release <strong>url</strong>
</li>
</ol>
<p></li>
<li>Add the following method:<br />
<code>-(BOOL)textFieldShouldReturn:(UITextField *)textField {</p>
<p>}</code></p>
<p></li>
<li>Inside the method:
<ol>
<li>Test if the <strong>textField</strong> equals the<strong> urlField</strong> </p>
</li>
<li>Close the keyboard with <strong>resignFirstResponder</strong>
</li>
<li>Call <strong>loadURL</strong> on<strong> self</strong>
</li>
<li>Outside of the conditional, return <strong>YES</strong></li>
</ol>
<p></li>
<li>Implement autoroatation<br />
<code>-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br />
    return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||<br />
            (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));<br />
}</code></p>
<p></li>
<li>Save, Build and Run
<p></li>
<li>Enter a url to test
<p></li>
<li>The most obvious thing lacking from<br />
the example is the usual forward and back buttons. You can<br />
 implement them with the <strong>UIWebView</strong>&#8217;s <strong>goForward</strong> and <strong>goBack</strong> methods. Provide a delegate that implements the <strong>UIWebViewDelegate</strong>.</p>
<p></li>
</ol>
<h4>Part 2</h4>
<p>All the substantial work in this application is done<br />
by the <strong>UIWebView</strong>. Once you&#8217;ve loaded the page, this view — backed<br />
by the <strong>WebKit engine</strong> for rendering HTML, interpreting JavaScript, and<br />
handling the network communication — does all the work for handling your web interactions, including submitting forms, navigating to new<br />
pages, running client-side browser apps, etc.</p>
<p>Even if you&#8217;re not planning on developing a browser, the <strong>UIWebView</strong><br />
has other compelling uses. While <strong>UIKit </strong>doesn&#8217;t provide a styled text<br />
component for iPhone apps, you can style HTML to your heart&#8217;s content<br />
with CSS, and put that styled HTML into a <strong>UIWebView</strong>. In fact, this is<br />
an excellent way to provide an <strong>about screen</strong> for your application, as<br />
you can provide links to your application&#8217;s home page, e-mails for tech<br />
support, or even dialable phone number links, all by just authoring<br />
HTML.<br />
To do this, instead of loading a page from the web, you can include<br />
your HTML, CSS, and images in the <strong>application bundle</strong>, and then find<br />
them inside the bundle.  Making a URL from a path in the bundle is just<br />
a matter of converting the path string to an <strong>NSURL</strong>:</p>
<ol>
<li>Create a web page named <strong>mywebpage.html</strong> or use index.html</p>
<p></li>
<li>In the <br />
<code>&lt;head&gt;&lt;/head&gt;</code> section add the following:<br />
<code>&lt;meta name="viewport" content="width=device-width; initial-scale=1.0;" /&gt;<br />
&lt;meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/&gt;<br />
&lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;</code></p>
</li>
<li>Set css body margin to zero
<p></li>
<li>Add the web page to your project. CTRL+click on Resources. Copy the file to your project.
<p></li>
<li>Create an application like you made in part 1, Name it <strong>Browser2</strong>.
<p></li>
<li>
This application is the same as the previous except for the <strong>loadURL</strong>method. Create the IBOutlets and IBAction in the header file</p>
<p></li>
<li>Open <strong>Browser2ViewController.xib</strong>  create a text filed, web view and button. Make connections and CTRL+click on the textField and link it to the FIle Owner&#8217;s delegate.
<p></li>
<li>Open the Inspector and in the  Text Field set the <strong>Text</strong> to <strong>webpage:</strong>
<p></li>
<li>
This application is the same as the previous except for the <strong>loadURL</strong>method. Open <strong>Browser2ViewController.m</strong> file and define the IBAction method and then create the <strong>loadURL</strong>method<br />
<br />
<code>//fill in the blank with a keyword to show your page<br />
//I did webpage:<br />
NSRange range = [urlField.text rangeOfString: @"______:"];<br />
    NSURL *url = NULL;<br />
    if (range.location == 0) {<br />
        // find the about page in bundle</p>
<p>        NSString *myPath =<br />
        //fill in the blank with the name of your page<br />
        [[NSBundle mainBundle] pathForResource:@"______"<br />
                                        ofType:@"html"];<br />
        url = [[NSURL alloc] initFileURLWithPath: myPath];<br />
    } else {<br />
        url = [[NSURL alloc] initWithString: urlField.text];<br />
    }<br />
    if (url != NULL) {<br />
        NSURLRequest *request = [[NSURLRequest alloc] initWithURL: url];<br />
        [webView loadRequest: request];<br />
        [request release];<br />
        [url release];</p>
<p>    }</code></p>
<p></li>
<li>Add the following method:<br />
<code>- (BOOL)textFieldShouldReturn:(UITextField *)textField {</p>
<p>}</code></p>
<p></li>
<li>Inside the method:
<ol>
<li>Test if the <strong>textField</strong> equals the<strong> urlField</strong> </p>
</li>
<li>Close the keyboard with <strong>resignFirstResponder</strong>
</li>
<li>Call <strong>loadURL</strong> on<strong> self</strong>
</li>
<li>Outside of the conditional, return <strong>YES</strong></li>
</ol>
<p></li>
<li>Implement autoroatation<br />
<code>-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br />
    return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||<br />
            (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));<br />
}</code></p>
<p></li>
<li>Save, Build and Run
<p></li>
<li>Modify the <strong>loadURL</strong> method so that if the urlField is empty or if the urlField contains the text <strong>webpage:</strong>, your page gets loaded.
<p></li>
<li>Add  the ability to go forward and back
<p></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/10/iphone-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Freeduinos!</title>
		<link>http://blog.lizarum.com/2009/09/freeduinos/</link>
		<comments>http://blog.lizarum.com/2009/09/freeduinos/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 04:08:36 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=127</guid>
		<description><![CDATA[Both my middle school and high school classes worked on putting together the Freeduino kits.
 In order to avoid any soldering mistakes, I asked students to place all there resistors in the board first, and once I checked them, they could solder away. Capacitors were next, then LEDs then everything else. The middle school class [...]]]></description>
			<content:encoded><![CDATA[<p>Both my middle school and high school classes worked on putting together the <a href="http://www.nkcelectronics.com/freeduino-arduino-diecimila-compatible-board-complete-kit.html">Freeduino kits</a>.<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/yhst-82942516561161_2071_4704635.jpeg" alt="yhst-82942516561161_2071_4704635" title="yhst-82942516561161_2071_4704635" width="400" height="267" class="alignnone size-full wp-image-130" /><br />
 In order to avoid any soldering mistakes, I asked students to place all there resistors in the board first, and once I checked them, they could solder away. Capacitors were next, then LEDs then everything else. The middle school class had more success with putting the kits together quickly. Maybe soldering was more of a novelty for them? They completed their boards within two classes, but the high school students had the potential to drag the process into a third class. Rather than do that, I finished all but one of the boards. There was one  high school student who completed his Freeduino over the weekend and worked on the <a href="http://www.adafruit.com/index.php?main_page=product_info&#038;cPath=17_21&#038;products_id=51&#038;zenid=1bda84f6ddfa5c96288f40e4ce8b010e">Proto Shield from Adafruit</a> in class.</p>
<p>My intention was to also have both groups make Proto Shields, but now I&#8217;m thinking that that project should be optional.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/freeduinos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Objective-C Hello World</title>
		<link>http://blog.lizarum.com/2009/09/more-objective-c-hello-world/</link>
		<comments>http://blog.lizarum.com/2009/09/more-objective-c-hello-world/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:31:49 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Teaching]]></category>
		<category><![CDATA[iPhone Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=106</guid>
		<description><![CDATA[So, the joke in class was &#8220;will there be a HelloWorld27?&#8221;
Probably not, but we are up to HelloWorld4. 
So the class is small, but made up of students with very different programming backgrounds. Two of the students are very comfortable in the Revolution environment, but are having some difficulty getting used to the C syntax. [...]]]></description>
			<content:encoded><![CDATA[<p>So, the joke in class was &#8220;will there be a HelloWorld27?&#8221;</p>
<p>Probably not, but we are up to HelloWorld4. </p>
<p>So the class is small, but made up of students with very different programming backgrounds. Two of the students are very comfortable in the Revolution environment, but are having some difficulty getting used to the C syntax. The other four students have used Java and/or Arduino, and while the syntax is different, they are finding it easier to adapt what they know to what we are doing.</p>
<p>I find for some students pictures are essential.</p>
<h4>HelloWorld04</h4>
<ol>
<li>Create a an image of yourself with the following dimensions:<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/dimension.png" alt="dimension" title="dimension" width="304" height="133" class="alignnone size-full wp-image-109" /></li>
<li>Save it as a png on the desktop
<p></li>
<li>Open Xcode and create a new project
<p></li>
<li>Create a <strong>View Based</strong> application<br />
    <img src="http://blog.lizarum.com/wp-content/uploads/2009/09/view_based.png" alt="view_based" title="view_based" width="600" height="443" class="alignnone size-full wp-image-110" /></p>
</li>
<li>Save it as <strong>HelloWorld04</strong>
<p></li>
<li>Open up the <strong>HelloWorld04ViewController.h</strong> file
<p></li>
<li>Create a <strong>UILabel</strong> pointer named <strong>label</strong>  of type <strong>IBOutlet</strong>
<p></li>
<li>Below the closed curly brace create an <strong>(IBAction) </strong> named <strong>hello</strong> and pass it <strong>(id)sender</strong>
<p></li>
<li>Open the Implementation file and define the <strong>hello</strong> function so that the <strong>text </strong> of <strong>label</strong> is set to a message
<p></li>
<li>Save the files
<p></li>
<li>CTRL+click on the <strong>Resources folder</strong> and add the png. Make sure to <strong> Copy items into destination group&#8217;s folder(if needed)</strong>
<p></li>
<li>Open up the main nib  file
<p></li>
<li>Double click on the <strong>HelloWorld04ViewController</strong> in the MainWindow.xib<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/viewController.png" alt="viewController" title="viewController" width="294" height="269" class="alignnone size-full wp-image-124" />
</li>
<li>Click on the link<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/link.png" alt="link" title="link" width="313" height="502" class="alignnone size-full wp-image-121" />
</li>
<li>From the library add a <strong>UIImageView</strong>
<p></li>
<li>In the attribute window set the image to your png
<p></li>
<li>From the library drag a <strong>UILabel</strong> onto the view. Adjust the size
<p></li>
<li>Clear the Text in the Text field
<p></li>
<li>Choose a color for the text in the attribute window
<p></li>
<li>From the library drag a button on to the view and change the label on the button to <strong>Press Me</strong>
<p></li>
<li>In the xib window click on <strong>File&#8217;s Owner</strong> and press &#8984;+2.
<p></li>
<li>Connect <strong>label</strong> to the label in the view.
<p></li>
<li>connect <strong>hello:</strong> to the button and select <strong>Touch up inside</strong>
<p></li>
<li>Save the xib file
<p></li>
<li>Build and run
<p></li>
<li>Modify the code so that the text keeps toggling between two  expressions. <br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/animation.gif" alt="animation" title="animation" width="200" height="385" class="alignnone size-full wp-image-120" />
</li>
<li>Add an <strong>NSLog()</strong> statement to print out the current text to the console.
<p></li>
<li>Save the xib file
<p></li>
<li>Build and run (&#8984;+&#8679;+R)
<p></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/more-objective-c-hello-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Tone Generator and a Cool Purchase</title>
		<link>http://blog.lizarum.com/2009/09/88/</link>
		<comments>http://blog.lizarum.com/2009/09/88/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 02:19:12 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[Makerbot]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Timer IC]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=88</guid>
		<description><![CDATA[A few years back, I took a summer physical computing class at Parsons with Dan Mikesell. For our first circuit he gave us the following schematic and image to work with:

I like this assignment because it introduces an IC chip, the NE555 Timer, and it makes an awful noise when it works. I also like [...]]]></description>
			<content:encoded><![CDATA[<p>A few years back, I took a summer physical computing class at Parsons with Dan Mikesell. For our first circuit he gave us the following schematic and image to work with:<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/555circuit-600x463.jpg" alt="555circuit" title="555circuit" width="600" height="463" class="alignnone size-medium wp-image-91" /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/555pinout-600x515.jpg" alt="555pinout" title="555pinout" width="600" height="515" class="alignnone size-medium wp-image-92" /><br />
I like this assignment because it introduces an IC chip, the NE555 Timer, and it makes an awful noise when it works. I also like it because initially it seems hard, but when students take a moment to think about the connections, it turns out to be quite simple. I always tell students to start with the GND and Vcc pins and go from there. It&#8217;s like solving a puzzle.</p>
<p>After displaying the schematic, I hand out a bag with the components. For each student, or group of students, I remove the components from the bag, name them, and describe their function. Then I leave students alone to figure out the wiring.</p>
<p>Today was Middle School Physical Computing and it was the last  class of the day. Everyone was exhausted, but we still managed to play with the LED Resistor Calculator and two students out of eight were able to generate annoying tones. </p>
<p>Success!</p>
<p>I also purchased the <a href="http://makerbot.com/">Makerbot </a>CupCake CNC  for school today. Makerbot describes the &#8220;CupCake CNC as a rock solid open source 3D printer that is easy to build, easy to run, and easy to use. Its 100% open source, built to be hacked, and beginner friendly.&#8221; The plan is to have the High School students research digital fabrication and then build the printer in November. Very cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/88/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Piranha Leds and LED Resistance Calculators</title>
		<link>http://blog.lizarum.com/2009/09/piranha-leds-and-led-resistance-calculators/</link>
		<comments>http://blog.lizarum.com/2009/09/piranha-leds-and-led-resistance-calculators/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 01:08:37 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[resistors]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=77</guid>
		<description><![CDATA[It was the first Middle School Physical Computing class of the week today. Class was split between two activities. The first was lighting a 5mm Flux RGB LED piranha. While not told whether they had a common cathode or common anode LED, students were given the following information:
 
DC forward current 20mA
Red: 2V typ, 2.4V [...]]]></description>
			<content:encoded><![CDATA[<p>It was the first Middle School Physical Computing class of the week today. Class was split between two activities. The first was lighting a 5mm Flux RGB LED piranha. While not told whether they had a common cathode or common anode LED, students were given the following information:<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/rgb_piranha.png" alt="rgb_piranha" title="rgb_piranha" width="185" height="182" class="alignnone size-full wp-image-78" /> <br />
DC forward current 20mA<br />
Red: 2V typ, 2.4V max<br />
Green: 3V typ, 3.6V max<br />
Blue: 3V typ, 3.6V max</p>
<p>After determining their resistor values, each student wired up their circuits to discover if their led was common cathode or common anode. Only one student managed to burn out the led by wiring both sides to power. </p>
<p>After creating some blended colors, students put the lights aside and went on to construct  <a href="http://www.evilmadscientist.com/article.php/ledcalc">Evil Mad Scientists</a>&#8217;s LED Resistance Calculators.</p>
<p>Next class we&#8217;ll put the calculators to use and solve a few problems!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/piranha-leds-and-led-resistance-calculators/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Our First IPhone App</title>
		<link>http://blog.lizarum.com/2009/09/our-first-iphone-app/</link>
		<comments>http://blog.lizarum.com/2009/09/our-first-iphone-app/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 03:21:52 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[iPhone Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=50</guid>
		<description><![CDATA[ I&#8217;m teaching a year long iPhone programming class to middle school students. The only prerequisite for the class is one year of programming. Some of them have worked with Actionscript, Processing and Arduino. Others only have experience with Revolution. 
I&#8217;ve tried to prepare the kids for the work that is involved. I&#8217;ve told them [...]]]></description>
			<content:encoded><![CDATA[<p> I&#8217;m teaching a year long iPhone programming class to middle school students. The only prerequisite for the class is one year of programming. Some of them have worked with Actionscript, Processing and Arduino. Others only have experience with Revolution. </p>
<p>I&#8217;ve tried to prepare the kids for the work that is involved. I&#8217;ve told them that graduate students at ITP were told that their iPhone programming class was going to be harder than any other programming class they&#8217;ve taken. In spite of my warnings, no one was scared off.</p>
<p>To get the ball rolling without talking about Objective-C, students worked on 2 simple applications. The first one, which is included below, is your basic Hello World app. In addition to creating a label, students also got to create their own icons for their applications.</p>
<p>The second application was a <strong>View-Based</strong> Application that modified the code in the implementation file so that the content could turn when the device is turned.</p>
<p>Everyone in the class completed the first part. There were two students that were confused about what a .png was and renamed their photoshop images with the .png extensions. After struggling to get their icons to show up, I&#8217;m pretty sure they won&#8217;t make that mistake again!</p>
<p>Overall, everyone was engaged and the energy level was high. Not bad for the last class of the day.</p>
<p></p>
<h2>Hello World</h2>
<p> <strong><span class="em"></strong>xib </span>files used to be called <span class="em">nib files</span> and Apple continues to refer to them as <span class="em">nib files</span> regardless of their extention.</p>
<p>    Nib files are composed of several parts
<ul>
<li>File&#8217;s Owner</li>
<li>First Reponder</li>
<li>View&mdash;instance of UIView class</li>
</ul>
<p></p>
<h4>Part 1</h4>
<ol>
<li>Open Xcode and create a new project (&#8984;+ &#8679;+N)<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/open_Xcode1-600x275.png" alt="open_Xcode" title="open_Xcode" width="600" height="275" class="alignnone size-medium wp-image-64" /></p>
<p></li>
<li>Select <strong>application</strong> under the iPhone icon on the left
<p></li>
<li>In the right panel select<strong> Window-Based Application</strong>, then press <strong>Choose</strong>. Save the project<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/windows1.png" alt="windows" title="windows" width="594" height="440" class="alignnone size-full wp-image-65" />
</li>
<li>Double-click on the <strong>nib file</strong> to open<br />
<strong>Interface Builder</strong><br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/nib1-600x262.png" alt="nib" title="nib" width="600" height="262" class="alignnone size-medium wp-image-66" /></p>
<p></li>
<li>Open Library (&#8984;+&#8679;+L)<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/open_library1.png" alt="open_library" title="open_library" width="276" height="342" class="alignnone size-full wp-image-67" /></p>
<p></li>
<li>Scroll down until you see a label icon.<br />
<hr /></li>
<li>Drag from library to view
<p></li>
<li>Open Inspector (&#8984;+ &#8679;+I)<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/open_inspector1.png" alt="open_inspector" title="open_inspector" width="285" height="343" class="alignnone size-full wp-image-68" />
</li>
<li>Modify label so that you pick a size, color, drop shadow and a message.<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/label_inspector-230x600.png" alt="label_inspector" title="label_inspector" width="230" height="600" class="alignnone size-medium wp-image-57" /></p>
</li>
<li>Save
<p></li>
<li>In Xcode click on <strong>Build and Run</strong>
<p></li>
</ol>
<p>
Interface Builder creates Objective-C objects and serializes those objects in to the nib file so that they can be loaded directly into memory at runtime.</p>
<p>Make sure that if you have an iPhone, your actual iPhone is not plugged  into the computer while developing iPhone applications.</p>
<p><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/HelloWorld-308x600.png" alt="HelloWorld" title="HelloWorld" width="308" height="600" class="alignnone size-medium wp-image-53" /></p>
<p></p>
<h4>Part 2</h4>
<ol>
<li>Open your last project in the <strong>Simulator</strong></p>
<p></li>
<li>Click on the <strong>Home Icon</strong><br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/home_icon.png" alt="home_icon" title="home_icon" width="223" height="152" class="alignnone size-full wp-image-54" /></p>
</li>
<li>Look at your application icon
</li>
<li>You need to create a <strong>.png</strong> icon 57 x 57 pixels. In Photoshop create your icon. Don&#8217;t worry about applying the button effect to it, it will happen automatically. Save it as <strong>icon.png</strong>
<p></li>
<li>Select the <strong>Resources folder</strong> and choose <strong>Add to Project </strong>from the <strong>Project menu</strong> and navigate to the icon. Choose <strong> Copy items into destination group&#8217;s folder(if needed</strong>).<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/importing_icon.png" alt="importing_icon" title="importing_icon" width="410" height="378" class="alignnone size-full wp-image-56" />
</li>
<li>In Xcode expand the <strong>Resources folder</strong>. Click once on <strong>Info.plist</strong>. This property list contains general information about the application you are building, including the name of the icon file.
<p></li>
<li>Find the row with the label <strong>Icon file</strong>. Double click on the empty cell to the right of the label and type in the name of your png file<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/plist-600x516.png" alt="plist" title="plist" width="600" height="516" class="alignnone size-medium wp-image-62" />
</li>
<li>Locate <strong>Bundle identifier</strong>. The standard naming convention is to use <strong>com</strong>  or <strong>org</strong> followed by a period, then the name of the organization, another period and the name of the application.
<p></li>
<li>compile and run
<p></li>
</ol>
<p><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/icon_view-300x600.png" alt="icon_view" title="icon_view" width="300" height="600" class="alignnone size-medium wp-image-55" /></p>
<p></p>
<h4>Clearing out old icons</h4>
<p>Under <strong>iPhone  Simulator</strong> menu  select<strong> Reset Content and Settings:</strong><br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/delete_icons.png" alt="delete_icons" title="delete_icons" width="252" height="213" class="alignnone size-full wp-image-52" /><br />
    </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/our-first-iphone-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
