<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D04GQnk8eSp7ImA9WhRbEEQ.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696</id><updated>2012-02-01T03:32:03.771-08:00</updated><category term="tricks" /><category term="iPhone" /><category term="computer vision" /><category term="BUG" /><category term="function name" /><category term="log" /><category term="Tutorial" /><category term="iphone tutorial" /><category term="line" /><category term="UIImagePickerController" /><category term="Objective C" /><category term="stanford  class" /><category term="NSlog" /><category term="first iphone application" /><category term="Debug mode" /><title>Learning iPhone Programming ...</title><subtitle type="html">A beginner's experiments and thoughts plus tutorials on iPhone programming</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/Fuwi" /><feedburner:info uri="blogspot/fuwi" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DE8ASXw4fip7ImA9Wx9REUw.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-6633908895090344850</id><published>2010-12-11T17:20:00.000-08:00</published><updated>2010-12-11T17:20:48.236-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-11T17:20:48.236-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="stanford  class" /><category scheme="http://www.blogger.com/atom/ns#" term="iphone tutorial" /><title>Nice tutorials, stanford course and other resources</title><content type="html">Here is a great resource for tutorials on iPhone development:&lt;br&gt;
&lt;a href="http://www.iphonesdkarticles.com/"&gt;http://www.iphonesdkarticles.com/&lt;/a&gt;

&lt;br&gt;
The tutorials are well written and explained. I had found this website immensely helpful as I started out!  &lt;br&gt;
&lt;br&gt;
Another great resource for learning is Stanford's course on iPhone programming. Their latest lecture slides / videos available for free on Stanford's iTunes and course websites:&lt;br&gt;
&lt;a href="http://itunes.stanford.edu/"&gt;http://itunes.stanford.edu/&lt;/a&gt; &lt;br&gt;
&lt;a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/"&gt;http://www.stanford.edu/class/cs193p/cgi-bin/drupal/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Also, I like the following books:&lt;br&gt;
&lt;a href="http://www.amazon.com/iPhone-Programmers-App-Driven-Approach-Developer/dp/013705842X"&gt;iPhone-Programmers-App-Driven-Approach-Developer&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.amazon.com/iPhone-SDK-Programming-Advanced-Development/dp/0470683988"&gt;iPhone-SDK-Programming-Advanced-Development&lt;/a&gt;&lt;br&gt;

&lt;br&gt;
The videos and books are the best resources if you want to learn all the aspects. Tutorials and online help can be used for specific topics. On a side note, I would suggest learning the apps in code rather than interface builder. Interface Builder is great however, it can be very confusing in the beginning as it hides certain information. Code is clear and transparent, so easy to begin with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-6633908895090344850?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VGrT4--37eDOqXXj5pr1DNTEfvc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VGrT4--37eDOqXXj5pr1DNTEfvc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VGrT4--37eDOqXXj5pr1DNTEfvc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VGrT4--37eDOqXXj5pr1DNTEfvc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/E-AMlBP1Aac" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/6633908895090344850/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2010/12/nice-tutorials-stanford-course-and.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/6633908895090344850?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/6633908895090344850?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/E-AMlBP1Aac/nice-tutorials-stanford-course-and.html" title="Nice tutorials, stanford course and other resources" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2010/12/nice-tutorials-stanford-course-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8NRX0zeip7ImA9Wx9SFE4.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-9087798110148297932</id><published>2010-09-10T00:31:00.000-07:00</published><updated>2010-12-03T21:01:34.382-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-03T21:01:34.382-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="BUG" /><category scheme="http://www.blogger.com/atom/ns#" term="UIImagePickerController" /><title>"UIImagePickerController does not work"!</title><content type="html">&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande',Arial; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
Here is another common mistake that I have seen with UIImagePickerController. Say, I want to display the picked image in the UIImageView (imageView), but it doesn't work. It is a simple issue, can anybody guess what the problem is before you see the answer below?&lt;/div&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Times; font-size: medium;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="jive-pre" style="background-color: white; background-image: none ! important; border: 1px solid rgb(184, 184, 184) ! important; display: block; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 10px 20px; outline-width: 0px; overflow: auto; padding: 10px; white-space: pre; width: auto;"&gt;&lt;code class="jive-code" style="background-color: transparent; border-width: 0px; font-family: monaco,'Courier New',Courier,monospace; font-size: 10px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;- (IBAction)takePhoto {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self presentModalViewController:imagePicker animated:YES];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[imagePicker release];
}

- (IBAction)choosePhoto {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self presentModalViewController:imagePicker animated:YES];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[imagePicker release];
}

- (void)imagePickerController:(UIImagePickerController *)imagePicker didFinishPickingMediaWithInfo:(NSDictionary *)info {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imageView.image = image;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self dismissModalViewControllerAnimated:YES];&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
&lt;u&gt;ANSWER&lt;/u&gt;:&lt;/div&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
We have not set the delegate! So no call backs being obtained! Just add :&amp;nbsp;&lt;/div&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
&lt;span class="Apple-style-span" style="color: #333333; line-height: 18px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: transparent; border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style="border-width: 0px; font-family: 'Lucida Grande',Arial; font-size: 12px; margin: 0px; outline-width: 0px; padding: 0px;"&gt;
&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&amp;nbsp;imagePicker.delegate = self;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-9087798110148297932?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9QyvinYpB_ZJzH1j0zdL8FdUexM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9QyvinYpB_ZJzH1j0zdL8FdUexM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9QyvinYpB_ZJzH1j0zdL8FdUexM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9QyvinYpB_ZJzH1j0zdL8FdUexM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/wLoPb8djM2c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/9087798110148297932/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2010/09/uiimagepickercontroller-does-not-work.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/9087798110148297932?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/9087798110148297932?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/wLoPb8djM2c/uiimagepickercontroller-does-not-work.html" title="&quot;UIImagePickerController does not work&quot;!" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2010/09/uiimagepickercontroller-does-not-work.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUBQ34_cCp7ImA9Wx5XEU0.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-5576047440162481781</id><published>2010-09-10T00:20:00.000-07:00</published><updated>2010-09-10T00:20:52.048-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-10T00:20:52.048-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="BUG" /><category scheme="http://www.blogger.com/atom/ns#" term="UIImagePickerController" /><title>UIImagePickerController strange behavior</title><content type="html">&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: 'Lucida Grande', Arial; font-size: 12px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
Here is a piece of UIImagePickerController source code. The source code is really straight forward. Say, we&amp;nbsp;have a ViewController and in the .m file, we declare the following information:LoadCamera is a function that open the initiates the UIImagePickerController and adds it to the delegate's window. What's wrong with the code?&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style="color: #643820; font-family: 'Courier New', Courier, monospace; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', Arial; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="color: #643820; font-family: 'Courier New', Courier, monospace; font-size: 12px;"&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;div&gt;
&lt;code class="jive-code" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: monaco, 'Courier New', Courier, monospace; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco; font-size: 12px; line-height: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;span class="Apple-style-span" style="color: grey;"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: #643820; font-family: 'Courier New', Courier, monospace; font-size: 12px; line-height: normal; white-space: normal;"&gt;&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', Arial; line-height: 18px;"&gt;&lt;pre class="jive-pre" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: none !important; background-origin: initial; background-repeat: repeat repeat; border-bottom-color: rgb(184, 184, 184) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(184, 184, 184) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(184, 184, 184) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(184, 184, 184) !important; border-top-style: solid !important; border-top-width: 1px !important; display: block; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; white-space: pre; width: auto;"&gt;&lt;code class="jive-code" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;-(IBAction)loadCamera:(UIButton *)sender{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PagingScrollViewAppDelegate *appDelegate = (PagingScrollViewAppDelegate *)[[UIApplication sharedApplication] delegate];

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imagePickerController = [[UIImagePickerController alloc] init];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imagePickerController.delegate = self;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[appDelegate.window addSubview:imagePickerController.view];
&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', Arial; font-size: 12px; line-height: 18px;"&gt;&lt;u&gt;Symptoms&lt;/u&gt;&lt;/span&gt;&lt;u&gt;:&lt;/u&gt;&lt;div&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande', Arial; font-size: 12px; line-height: 18px;"&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
The strange thing occurs when I select an image inside the UIImagePickerController, instead of calling the&lt;/div&gt;
&lt;pre class="jive-pre" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: none !important; background-origin: initial; background-position: initial initial; background-repeat: repeat repeat; border-bottom-color: rgb(184, 184, 184) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(184, 184, 184) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(184, 184, 184) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(184, 184, 184) !important; border-top-style: solid !important; border-top-width: 1px !important; display: block; font-family: 'Lucida Grande', Arial; font-size: 12px; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; white-space: pre; width: auto;"&gt;&lt;code class="jive-code" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;- (void)imagePickerController:(UIImagePickerController *)picker 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;didFinishPickingImage:(UIImage *)image
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editingInfo:(NSDictionary *)editingInfo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class="jive-code" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: monaco, 'Courier New', Courier, monospace; font-size: 10px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
it calls the&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; height: 8pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 8pt; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;/div&gt;
&lt;pre class="jive-pre" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: none !important; background-origin: initial; background-repeat: repeat repeat; border-bottom-color: rgb(184, 184, 184) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(184, 184, 184) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(184, 184, 184) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(184, 184, 184) !important; border-top-style: solid !important; border-top-width: 1px !important; display: block; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; white-space: pre; width: auto;"&gt;&lt;code class="jive-code" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: monaco, 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-size: 10px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', Arial; font-size: 12px;"&gt;&lt;u&gt;Answer&lt;/u&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: monaco, 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-size: 10px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande', Arial; font-size: 12px;"&gt;&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
Basically, it is due to the fact that we are adding the UIImagePickerController's view as a subview of the main view.&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; height: 8pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 8pt; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
UIImagePickerController should be presented modally. Else, it gives strange behavior!&amp;nbsp;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; height: 8pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 8pt; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; height: 8pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 8pt; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
Hope that helps!&lt;/div&gt;
&lt;pre class="jive-pre" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: none !important; background-origin: initial; background-repeat: repeat repeat; border-bottom-color: rgb(184, 184, 184) !important; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(184, 184, 184) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(184, 184, 184) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(184, 184, 184) !important; border-top-style: solid !important; border-top-width: 1px !important; display: block; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; white-space: pre; width: auto;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small; white-space: normal;"&gt;&lt;br /&gt;
&lt;div style="font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span style="color: #548087;"&gt;&lt;span class="Apple-style-span" style="color: #333333; white-space: pre;"&gt;UIViewController *viewController = [[[UIViewController alloc] initWithNibName:&lt;span style="color: #b51aa3;"&gt;nil&lt;/span&gt;                                    bundle:&lt;span style="color: #b51aa3;"&gt;nil&lt;/span&gt;] autorelease];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span style="color: #548087;"&gt;self.navController&lt;/span&gt; = [[[UINavigationController alloc] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style="font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; initWithRootViewController:viewController] autorelease ];&lt;/div&gt;
&lt;div style="font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;/div&gt;
&lt;div style="font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
[appDelegate.&lt;span style="color: #548087;"&gt;window&lt;/span&gt; addSubview: [&lt;span style="color: #548087;"&gt;navController&lt;/span&gt; view]];&lt;/div&gt;
&lt;div style="font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span style="color: #548087;"&gt;[navController&lt;/span&gt; presentModalViewController:&lt;span style="color: #548087;"&gt;myImagePicker&lt;/span&gt; animated: &lt;span style="color: #b51aa3;"&gt;YES&lt;/span&gt;];&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: 'Lucida Grande', Arial; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-5576047440162481781?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sqMnbPthu4S6Ve9960n7ajYrXzc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sqMnbPthu4S6Ve9960n7ajYrXzc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sqMnbPthu4S6Ve9960n7ajYrXzc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sqMnbPthu4S6Ve9960n7ajYrXzc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/pLlveiVkhtM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/5576047440162481781/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2010/09/uiimagepickercontroller-strange.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/5576047440162481781?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/5576047440162481781?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/pLlveiVkhtM/uiimagepickercontroller-strange.html" title="UIImagePickerController strange behavior" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2010/09/uiimagepickercontroller-strange.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MGRH48fCp7ImA9Wx5XEU0.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-6181212896615204930</id><published>2010-09-09T23:50:00.000-07:00</published><updated>2010-09-09T23:50:25.074-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-09T23:50:25.074-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tricks" /><category scheme="http://www.blogger.com/atom/ns#" term="Objective C" /><category scheme="http://www.blogger.com/atom/ns#" term="log" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="NSlog" /><category scheme="http://www.blogger.com/atom/ns#" term="line" /><category scheme="http://www.blogger.com/atom/ns#" term="Debug mode" /><category scheme="http://www.blogger.com/atom/ns#" term="function name" /><title>NSLog tricks: Log only in Debug mode. Add Function name, Line num</title><content type="html">&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco; font-size: 12px;"&gt;It is a common requirement to log certain statements only in the Debug mode, while needing to avoid them in the release mode. Of course, one option is to have statements like this everywhere:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco; font-size: 12px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: 14px; white-space: pre;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco; font-size: 12px;"&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;span class="Apple-style-span" style="color: grey;"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: #643820; font-family: 'Courier New', Courier, monospace; font-size: 12px; line-height: normal; white-space: normal;"&gt;&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#ifdef DEBUGGING&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #c41a16; font-family: Times;"&gt;&lt;span style="color: #643820;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NSLog&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@"Data: point.x = %f, point.y = %f"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;, point.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #5c2699;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;, point.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #5c2699;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #178600; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="color: #754a2b; font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#endif&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco; font-size: 12px;"&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;span class="Apple-style-span" style="color: grey;"&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;div style="color: #643820; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: Monaco;"&gt;And define DEBUGGING somewhere in the header file. However, this can get very verbose.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: Monaco;"&gt;A better option is to use Macros. In project_Prefix.pch file, include:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: black; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;span class="Apple-style-span" style="color: grey;"&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: #643820; font-family: 'Courier New', Courier, monospace; font-size: 12px; line-height: normal; white-space: normal;"&gt;&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#ifdef DEBUGGING&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;define DBLog(fmt,...) NSLog(@&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #ca2e1f;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;"%@"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;,[NSString stringWithFormat:(fmt), ##__VA_ARGS__]);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #178600; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="color: #754a2b; font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#else&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;define DBLog(...)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;#endif&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Also, you can include, in "Edit Active Target" -&amp;gt; "Build" -&amp;gt; (Select Debug Config) -&amp;gt; "Other C/C++ Flags", write:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-DDEBUGGING&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;This automatically defines DEBUGGING flag in Debug mode. Leave it blank for the Release mode. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Now, you can use DBLog instead of NSLog:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #c41a16; font-family: Times;"&gt;&lt;span style="color: #643820;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DBLog&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@"Data: point.x = %f, point.y = %f"&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;, point.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #5c2699;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;, point.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #5c2699;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;This will automatically print statements in the Debug mode, and not print the statements in the Release mode!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: 12.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;(Alternatively, you can have a line in the Prefix.pch file:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;#define DEBUGGING&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;And &lt;u&gt;manually comment it out&lt;/u&gt; for Release mode.)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Similarly, if you want you also have function name and line number, there is a nice trick:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #643820; font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;#ifdef&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; DEBUGGING&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# &amp;nbsp; define DLog(fmt, ...) NSLog((@"Func: %s , Line: %d, " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;#else&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;# &amp;nbsp; define DLog(...)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;#endif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="color: #754a2b; font: normal normal normal 12px/normal Monaco; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="color: #643820;"&gt;If you always want to print out regardless of the DEBUGGING SETTING, but with the function name and line number:&lt;/span&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;#define&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;ALog&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;fmt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;...)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NSLog&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;((@&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;"Func: %s , Line: %d, "&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; fmt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;),&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; __PRETTY_FUNCTION__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; __LINE__&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="background-color: #ead1dc;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;##__VA_ARGS__);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="prettyprint" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;span class="Apple-style-span" style="font-family: Monaco;"&gt;&lt;span class="Apple-style-span" style="white-space: normal;"&gt;Hope that helps! Happy iCoding!&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-6181212896615204930?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bC_wJYXTR8bTtnpUOHfoerbF7ZQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bC_wJYXTR8bTtnpUOHfoerbF7ZQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bC_wJYXTR8bTtnpUOHfoerbF7ZQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bC_wJYXTR8bTtnpUOHfoerbF7ZQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/D7kRHZDrbVo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/6181212896615204930/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2010/09/nslog-tricks-log-only-in-debug-mode-add.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/6181212896615204930?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/6181212896615204930?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/D7kRHZDrbVo/nslog-tricks-log-only-in-debug-mode-add.html" title="NSLog tricks: Log only in Debug mode. Add Function name, Line num" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2010/09/nslog-tricks-log-only-in-debug-mode-add.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4ESHg7cCp7ImA9WxBRFk4.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-4597268169719507290</id><published>2009-12-02T22:21:00.000-08:00</published><updated>2010-01-04T11:55:09.608-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-04T11:55:09.608-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial" /><category scheme="http://www.blogger.com/atom/ns#" term="first iphone application" /><title>First iPhone Application - Tutorial II</title><content type="html">&lt;a name="Top"&gt;Now, let's extend the &lt;/a&gt;&lt;a href="http://iphoneprogrammingfordummies.blogspot.com/2009/11/first-iphone-application-tutorial.html"&gt;previous one&lt;/a&gt; so that it responds to a button press!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="#Intro"&gt;1. Introduction&lt;/a&gt;&lt;br /&gt;
&lt;a href="#AddButton"&gt;2. Add the button to the window&lt;/a&gt;&lt;br /&gt;
&lt;a href="#ConnectToAction"&gt;3. Connect button to action method&lt;/a&gt;&lt;br /&gt;
&lt;a href="#BuildAndRun"&gt;4. Build And Run&lt;/a&gt;&lt;br /&gt;
&lt;a href="#Analysis"&gt;5. Analysis / Big Picture&lt;/a&gt;&lt;br /&gt;
&lt;a href="#RunWithSound"&gt;6. Add Sound to the project&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;&lt;a name="Intro"&gt;&lt;b&gt;1. Introduction&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;Last time we had an app which showed an image and a label. It did not respond to any action button. This time, let's add an action button. We will add a button and when it is pressed, the label will show the text, and the app will also make a sound. So:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;How to add a button to the interface builder ?&lt;/li&gt;
&lt;li&gt;How to connect the clicking of that button to an action ? &lt;/li&gt;
&lt;li&gt;How to play sound ? &lt;/li&gt;
&lt;/ul&gt;&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name="AddButton"&gt;&lt;b&gt;2. Add the button to the window&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;- Double-click on the MainWindow.xib file. It should pop up the Interface builder as well. &lt;br /&gt;
&lt;br /&gt;
- From the library, drag a &lt;b&gt;"Rectangular Button"&lt;/b&gt; (of class UIButton) on to the window. You can play around with the attributes inspector to change its title. I gave the title "Wake him up!". I also erased the title of the other label we had earlier. We will show the text on the label when the button is pressed. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxdjGNqHqJI/AAAAAAAAB1w/O9SnelDxjU8/s1600-h/Picture1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxdjGNqHqJI/AAAAAAAAB1w/O9SnelDxjU8/s400/Picture1.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name="ConnectToAction"&gt;&lt;b&gt;3. How to connect it to action?&lt;/b&gt; &lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;This Button is just a user interface on the screen view. How to connect this to any action? It cannot control any data/action directly. The window cannot respond to the click of that button. That is where we need a Controller, that can knows how to respond to that click of the button. A controller is the connection between the data and the view. Since we are following the Interface Builder, we will create this controller object using that. &lt;br /&gt;
&lt;br /&gt;
- Add a new controller file to the project. From XCode: File -&amp;gt; New File -&amp;gt; Cocoa Touch Class (under iPhone OS) -&amp;gt; Objective-C class (subclass of NSObject). Call it Controller. This will add Controller.h and Controller.m files to the project. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxrXDBPOWOI/AAAAAAAAB2Q/SqZMkxwPi34/s1600-h/Picture+3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="234" src="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxrXDBPOWOI/AAAAAAAAB2Q/SqZMkxwPi34/s320/Picture+3.png" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
- Drag a "Object" from the library on to the MainWindow.xib. We gotta now connect the controller in the files to the controller in the MainWindow.xib. Click on the Controller object in the Mainwindow and in the Identity Inspector tab change the Class to "Controller".&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxrXE1DfSsI/AAAAAAAAB2Y/lRn-Lfi__Wk/s1600-h/Picture+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxrXE1DfSsI/AAAAAAAAB2Y/lRn-Lfi__Wk/s400/Picture+1.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
- In XCode, add an IBOutlet and an IBAction method to the Controller class:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&amp;nbsp; Controller.h &amp;nbsp;/////////////////////////////////&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #c41a16; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #643820;"&gt;#import &lt;/span&gt;&amp;lt; Foundation/Foundation.h &amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #c41a16; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #643820;"&gt;#import &lt;/span&gt;&amp;lt; UIKit/UIKit.h &amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #aa0d91;"&gt;@interface&lt;/span&gt; Controller : NSObject {&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;IBOutlet&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: #5c2699;"&gt;UILabel&lt;/span&gt;&lt;span style="color: black;"&gt; *&lt;/span&gt;&lt;span style="color: #3f6e74;"&gt;myLabel&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;}&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;-(&lt;span style="color: #aa0d91;"&gt;IBAction&lt;/span&gt;) onWakeUpButtonClicked:(&lt;span style="color: #aa0d91;"&gt;id&lt;/span&gt;)sender ;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@property&lt;span style="color: black;"&gt; (&lt;/span&gt;nonatomic&lt;span style="color: black;"&gt;, &lt;/span&gt;retain&lt;span style="color: black;"&gt;) &lt;/span&gt;IBOutlet&lt;span style="color: black;"&gt; &lt;/span&gt;&lt;span style="color: #5c2699;"&gt;UILabel&lt;/span&gt;&lt;span style="color: black;"&gt; *&lt;/span&gt;&lt;span style="color: #3f6e74;"&gt;myLabel&lt;/span&gt;&lt;span style="color: black;"&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@end&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;/////////////////////////////////////////////////&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&amp;nbsp; Controller.m&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #aa0d91;"&gt;&lt;span style="color: #007400;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #c41a16; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #643820;"&gt;#import &lt;/span&gt;"Controller.h"&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@implementation&lt;span style="color: black;"&gt; Controller&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@synthesize&lt;span style="color: black;"&gt; myLabel;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;- (&lt;span style="color: #aa0d91;"&gt;IBAction&lt;/span&gt;) onWakeUpButtonClicked :(&lt;span style="color: #aa0d91;"&gt;id&lt;/span&gt;)sender {&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #3f6e74;"&gt;myLabel&lt;/span&gt;.text = [&lt;span style="color: #5c2699;"&gt;NSString&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;stringWithFormat&lt;/span&gt;:&lt;span style="color: #c41a16;"&gt;@"Dude, Wake up!"&lt;/span&gt;];&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;}&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@end&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;////////////////////////////////////////////////////////&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
- The action method is supposed to happen when the button is pressed. The label should show the text that we want to show when the button is pressed. We have to connect this label and the action method to the ones on the Interface Builder. &lt;br /&gt;
&lt;br /&gt;
- In IB, click on the Controller and in the Inspector, you should see myLabel under the Controller Connections tab. Draw a line from the small circle next to it to the label on the Window. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxrCYEjMf4I/AAAAAAAAB14/Q5wc6K6745E/s1600-h/Pic1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxrCYEjMf4I/AAAAAAAAB14/Q5wc6K6745E/s400/Pic1.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
- In the window, click on the "Wake him Up" UILabel. In the connections, you should see a list of actions. Drag the circle next to "touch up inside" on to the "Controller" in the MainWindow.xib. In the little Menu that pops, choose "onWakeUpButtonClicked". Thus, we have established connections between the IB elements (which the user sees) to the code elements (which run the show behind the doors).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxrCaBVGdgI/AAAAAAAAB2A/wK6GY5Jna74/s1600-h/Pic2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxrCaBVGdgI/AAAAAAAAB2A/wK6GY5Jna74/s400/Pic2.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
If you click on the Controller in the MainWindow.xib, you should see the &lt;b&gt;onWakeUpButtonClicked&lt;/b&gt; method shown connected to the button in Received Actions (if you made the previous connection properly).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_QZ6RMUGlHMQ/SxrCbVJy75I/AAAAAAAAB2I/wgumbr_U3yA/s1600-h/Picture+6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_QZ6RMUGlHMQ/SxrCbVJy75I/AAAAAAAAB2I/wgumbr_U3yA/s400/Picture+6.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name="BuildAndRun"&gt;&lt;b&gt;4. Build and Run..&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;You should see that when you press the "Wake Him Up" button, the label shows the text "Dude, Wake up!". We will also add the sound alert now. Before that, let's recap what we did so far in a big picture sense. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name="Analysis"&gt;&lt;b&gt;5. Analysis:&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;We had an image and a label on the window. We added a button to trigger some action when pressed.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;To be able to respond to the Button click, we had to make a controller object which knows how to respond to the button click. We instantiated the Controller object by dragging the block from library in to the MainWindow.xib. We connected that blob to the one in the code by defining it's "Class" in the Interface Builder (Step 3).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;We connected the action method to the button click via interface builder. We also had to make the label a member of the controller object, so that the text on that can be changed in response to the click. We connected the member myLabel of the Controller to one on the window.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;IBAction and IBOutlet are keywords that tell the Interface Builder to look for when we are making the connections. That is how when we click on the view, some action onWakeUpButtonClicked is triggered by the code.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
If you look at the Controller.m code, you will see that the onWakeUpButtonClicked method does nothing but sets the label's text to what we wanted. &lt;br /&gt;
&lt;span style="color: brown;"&gt;&lt;br /&gt;
- (IBAction) onWakeUpButtonClicked :(id)sender {&lt;br /&gt;
myLabel.text = [NSString stringWithFormat:@"Dude, Wake up!"];&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name="RunWithSound"&gt;&lt;b&gt;6. Adding Sound to the Action Method:&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;It is very Simple indeed. &lt;br /&gt;
&lt;br /&gt;
- Drag any sound file from the Finder to the "Resources" folder in left menu on XCode. (Mine is called danger.au . I found it somewhere in the Java Applets sound folder). A dialog box pops us asking you to add it to the PhotoFrame target. &lt;br /&gt;
&lt;br /&gt;
- Add AudioToolBox to the Frameworks. Right Click on the FrameWorks folder, Add Existing Frameworks. Choose AudioToolbox.  add "#import &lt;audiotoolbox/audioservices.h&gt;" in Controller.m&lt;br /&gt;
&lt;br /&gt;
- Modify the onWakeUpButtonClicked method and use the AudioServices toolbox APIs to play the sound. &lt;br /&gt;
&lt;br /&gt;
&lt;/audiotoolbox/audioservices.h&gt;&lt;br /&gt;
&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&amp;nbsp; Controller.m&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&amp;nbsp; PhotoFrame&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&amp;nbsp; Created by Pannag Sanketi on 12/2/09.&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&amp;nbsp; Copyright 2009 __MyCompanyName__. All rights reserved.&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;//&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #c41a16; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #643820;"&gt;#import &lt;/span&gt;"Controller.h"&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: #c41a16; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: #643820;"&gt;#import &lt;/span&gt; &amp;lt; Audiotoolbox/Audioservices.h &amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div style="color: #c41a16; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #643820;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@implementation&lt;span style="color: black;"&gt; Controller&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@synthesize&lt;span style="color: black;"&gt; myLabel;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;- (&lt;span style="color: #aa0d91;"&gt;IBAction&lt;/span&gt;) onWakeUpButtonClicked :(&lt;span style="color: #aa0d91;"&gt;id&lt;/span&gt;)sender {&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;// Form a URL to the sound file, which in init using the Path&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;span style="color: #5c2699;"&gt;NSBundle&lt;/span&gt; *mainBundle = [&lt;span style="color: #5c2699;"&gt;NSBundle&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;mainBundle&lt;/span&gt;];&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;span style="color: #5c2699;"&gt;NSString&lt;/span&gt; *filePath = [mainBundle &lt;span style="color: #2e0d6e;"&gt;pathForResource&lt;/span&gt;:&lt;span style="color: #c41a16;"&gt;@"danger"&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;ofType&lt;/span&gt;:&lt;span style="color: #c41a16;"&gt;@"au"&lt;/span&gt;];&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;span style="color: #5c2699;"&gt;NSURL&lt;/span&gt; *aFileURL = [&lt;span style="color: #5c2699;"&gt;NSURL&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;fileURLWithPath&lt;/span&gt;:filePath &lt;span style="color: #2e0d6e;"&gt;isDirectory&lt;/span&gt;:&lt;span style="color: #aa0d91;"&gt;NO&lt;/span&gt;];&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;// Create a sound ID, &lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #5c2699; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;SystemSoundID&lt;span style="color: black;"&gt; myID;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;// Register the sound&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #2e0d6e; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;AudioServicesCreateSystemSoundID&lt;span style="color: black;"&gt;((&lt;/span&gt;&lt;span style="color: #5c2699;"&gt;CFURLRef&lt;/span&gt;&lt;span style="color: black;"&gt;)aFileURL, &amp;amp;myID) ;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;// Play the sound!&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #2e0d6e; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;AudioServicesPlaySystemSound&lt;span style="color: black;"&gt;(myID);&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #007400; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;span style="color: black;"&gt;&lt;span style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;// Put the label text to what we want&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: #3f6e74;"&gt;myLabel&lt;/span&gt;.text = [&lt;span style="color: #5c2699;"&gt;NSString&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;stringWithFormat&lt;/span&gt;:&lt;span style="color: #c41a16;"&gt;@"Dude, Wake up!"&lt;/span&gt;];&lt;br /&gt;
&lt;/div&gt;&lt;div style="font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;}&lt;br /&gt;
&lt;/div&gt;&lt;div style="color: #aa0d91; font: 10.0px Monaco; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;@end&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;7. Build and Run... with the sound!&lt;/b&gt;&lt;br /&gt;
&lt;hr /&gt;There you go! When you press the "Wake Him Up" button, there is a sound played as well as the label shows the text "Dude, Wake up!".&lt;br /&gt;
&lt;a href="#Top"&gt;Back to Top&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-4597268169719507290?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jw9IuJGgyzcLdI8poHGm8_Xl8gY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jw9IuJGgyzcLdI8poHGm8_Xl8gY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jw9IuJGgyzcLdI8poHGm8_Xl8gY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jw9IuJGgyzcLdI8poHGm8_Xl8gY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/SNzE6tiTw0E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/4597268169719507290/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2009/12/first-iphone-application-tutorial-part.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/4597268169719507290?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/4597268169719507290?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/SNzE6tiTw0E/first-iphone-application-tutorial-part.html" title="First iPhone Application - Tutorial II" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxdjGNqHqJI/AAAAAAAAB1w/O9SnelDxjU8/s72-c/Picture1.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2009/12/first-iphone-application-tutorial-part.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8FQXs5eCp7ImA9Wx9SFEk.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-5997125956630302576</id><published>2009-11-28T21:32:00.000-08:00</published><updated>2010-12-03T21:33:30.520-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-03T21:33:30.520-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial" /><category scheme="http://www.blogger.com/atom/ns#" term="first iphone application" /><title>First iPhone Application - Tutorial</title><content type="html">&lt;a name="Top1"&gt;Creating First iPhone Application&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="#Intro"&gt;Introduction&lt;/a&gt;&lt;br /&gt;
&lt;a href="#CreateProject"&gt;1. Create a new Project&lt;/a&gt;&lt;br /&gt;
&lt;a href="#AddImage"&gt;2. Add an image to the Resources&lt;/a&gt;&lt;br /&gt;
&lt;a href="#AddImageViewLabel"&gt;3. Add an image view and a label&lt;/a&gt;&lt;br /&gt;
&lt;a href="#BuildAndRun1"&gt;4. Build And Run&lt;/a&gt;&lt;br /&gt;
&lt;a href="#Analysis1"&gt;5. Analysis&lt;/a&gt;&lt;br /&gt;
&lt;a href="#SourceCode1"&gt;6. Source Code&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;a name="Intro"&gt;Introduction&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;We will build a very simple application using the iPhone SDK. The app will show a label and an image&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;We will further extend it to react to a button press&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;We will see both with and without using the Interface Builder&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;That will clarify the difference between &amp;nbsp;allocating a "view" in xcode vs. dragging/ dropping one from Interface Builder&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Add elements directly to the Main Window versus adding it to another view and adding that view to the Main Window&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
What you need:&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;You have to use a Mac to develop iPhone apps. Specifically, you need an Intel Mac – iPhone development isn’t supported on PowerPC Macs. There are hacks to make it work (at time of writing), but if you’re serious about it you should probably just get an Intel Mac. Doesn’t have to be brand new; all new Macs have been Intel-based for years now&lt;/li&gt;
&lt;li&gt;You’ll need the iPhone SDK, which is free from Apple when you sign up as an&amp;nbsp;&lt;a href="http://developer.apple.com/iphone" style="background-color: transparent; border-width: 0px 0px 1px; margin: 0px; outline-width: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;

&lt;a name="CreateProject"&gt;1. Create a new project&lt;/a&gt;&lt;/div&gt;
&lt;hr /&gt;
Start XCode. File -&amp;gt; New Project-&amp;gt; Select Application Under iPhone OS. Choose a "Window based application" (In some later post, I will try to clarify the difference between the different kinds of applications)&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxHzPoM7YvI/AAAAAAAAB1A/lPHfoGezubA/s1600/+WindowApp.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="234" src="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxHzPoM7YvI/AAAAAAAAB1A/lPHfoGezubA/s320/+WindowApp.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Name it PhotoFrame. The application will be built for you with some basic files. You should be able to build and run this. It will pop up the iPhone Simulator. The app will show just a blank screen.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;

&lt;a name="AddImage"&gt;2. Add an image to the Resources&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;In XCode, on the left side menu, there is a folder called "Resources". Under that there is a file called MainWindow.xib. This is the main window that appears on the app. Anything you want to add to the app has to be added to this, either directly, or via adding other views as subviews. In this case, we are going to add an image and a label directly to the window using Interface Builder, which is the GUI integrated with XCode. (Later I will post where you do the same thing in code only, and also adding other views as subviews). &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Double Click on the MainWindow.xib. It will pop open the Interface Builder.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxH5bdlyXlI/AAAAAAAAB1I/XHGSKHTqayQ/s1600/Picture+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_QZ6RMUGlHMQ/SxH5bdlyXlI/AAAAAAAAB1I/XHGSKHTqayQ/s400/Picture+2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;The above picture shows the various components of the interface builder. The MainWindow.xib, the window, the attributes inspector, and the library. &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;First, we need to add an image to your Resources folder. Drag an image from the Finder to the Resources folder. It will ask you to chose the target. Choose the name of you app as shown below:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/_QZ6RMUGlHMQ/SxH7URtHYqI/AAAAAAAAB1Q/rTGD6f4n5Pw/s1600/Picture+3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_QZ6RMUGlHMQ/SxH7URtHYqI/AAAAAAAAB1Q/rTGD6f4n5Pw/s200/Picture+3.png" /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxH7z3X2oZI/AAAAAAAAB1Y/8vIp7iOpufI/s1600/Picture+4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img &amp;nbsp;="" border="0" src="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxH7z3X2oZI/AAAAAAAAB1Y/8vIp7iOpufI/s200/Picture+4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;

&lt;a name="AddImageViewLabel"&gt;3.Add an image view and a label to the project&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;div style="margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;In the Window, drag an ImageView from the library. Click on the image on the window, then, in the attributes window, choose from the "Image " drop down menu, &amp;nbsp;the image that you had put in Resources earlier. Choose "Aspect Fit" in the "Mode" drop down menu. &amp;nbsp;Then the actual image will be shown on the ImageView.&amp;nbsp;This should look something like this.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;a href="http://2.bp.blogspot.com/_QZ6RMUGlHMQ/SxH9u0EDZHI/AAAAAAAAB1g/KKvupAqxcf8/s1600/Picture+5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://2.bp.blogspot.com/_QZ6RMUGlHMQ/SxH9u0EDZHI/AAAAAAAAB1g/KKvupAqxcf8/s320/Picture+5.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Also add a text label by dragging in on to the window from the library. Change the title to whatever you want. I called it "Dude, Wake Up" :-).&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;We can add an image view &amp;nbsp;in the code as well. Since we did it through the interface builder, &amp;nbsp;we will not need to allocate memory or deallocate memory or anything. Look at the code snippet below.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="color: green; font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #c41a16; font-family: Monaco; font-size-adjust: none; font-size: 10px; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: #643820;"&gt;&lt;span style="font-size: medium;"&gt;#import &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: medium;"&gt;"PhotoFrameAppDelegate.h"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: #aa0d91;"&gt;@implementation&lt;/span&gt; PhotoFrameAppDelegate&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #aa0d91; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;@synthesize&lt;span style="color: black;"&gt; window;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;- (&lt;span style="color: #aa0d91;"&gt;void&lt;/span&gt;)applicationDidFinishLaunching:(&lt;span style="color: #5c2699;"&gt;UIApplication&lt;/span&gt; *)application { &amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #007400; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;// Override point for customization after application launch&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #2e0d6e; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style="color: #3f6e74;"&gt;window&lt;/span&gt;&lt;span style="color: black;"&gt; &lt;/span&gt;makeKeyAndVisible&lt;span style="color: black;"&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;- (&lt;span style="color: #aa0d91;"&gt;void&lt;/span&gt;)dealloc {&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&amp;nbsp; &amp;nbsp; [&lt;span style="color: #3f6e74;"&gt;window&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;release&lt;/span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&amp;nbsp; &amp;nbsp; [&lt;span style="color: #aa0d91;"&gt;super&lt;/span&gt; &lt;span style="color: #2e0d6e;"&gt;dealloc&lt;/span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; min-height: 14px;"&gt;
&lt;/div&gt;
&lt;div style="color: #aa0d91; font-family: Monaco; font-size-adjust: none; font-size: 10px; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: medium;"&gt;@end&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: black; font-family: Times; font-size: medium;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; margin: 0px; text-align: left;"&gt;
&lt;span style="color: green; font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;/span&gt;&lt;/div&gt;
&lt;div style="color: #c41a16; font-family: Monaco; font-size: 10px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px;"&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;When the application launches,&amp;nbsp;applicationDidFinishLaunching&amp;nbsp;function is called. The imageview will automatically be shown on the main window. No need to write any code.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;div style="margin: 0px;"&gt;

&lt;a name="BuildAndRun1"&gt;4. Build and Run the app&lt;/a&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Just build and run the app. This is how it should look like. It just shows a label and an image. It does not react to any action or anything.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: center;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;
&lt;a href="http://4.bp.blogspot.com/_QZ6RMUGlHMQ/SxIEjpFVsKI/AAAAAAAAB1o/enjmqZcALU0/s1600/Picture+6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_QZ6RMUGlHMQ/SxIEjpFVsKI/AAAAAAAAB1o/enjmqZcALU0/s200/Picture+6.png" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Let me know if you have any questions. Comments on improving the posting are welcome!&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Next time, we will add an action button which will play a sound along with showing the label + image when you press a button. We will also do the app using code instead of dragging the views from library on to the window. Let me know if you want a copy of the source code.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;a name="Analysis1"&gt;5. Analysis&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
- We just showed an Image and a label to go with it.&lt;br /&gt;
&lt;br /&gt;
- Image View is an UIView that can hold and show an image. The window cannot directly show an image. By dragging the ImageView on to the window, we added the image view as a subview to the main window. &lt;br /&gt;
&lt;br /&gt;
- We could have also added another view to the project, put the image and the label on the view, and then added that view as a subview to the main window. In this application, it is not necessary. In some cases, where you want your view to draw custom things, you will have to do that. &lt;br /&gt;
&lt;br /&gt;

&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name="SourceCode1"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="text-decoration: underline;"&gt;6. Source Code &lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br/&gt;
You can download the source code 
&lt;a href="http://vehicle.me.berkeley.edu/~pannag/iPhone/PhotoFrame.zip"&gt;HERE&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;a href="#Top1"&gt;Back to Top&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-5997125956630302576?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fY0KgO5Nw44RSuc0cGSR78cXBgk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fY0KgO5Nw44RSuc0cGSR78cXBgk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fY0KgO5Nw44RSuc0cGSR78cXBgk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fY0KgO5Nw44RSuc0cGSR78cXBgk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/EhdPVIgR3Jw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/5997125956630302576/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2009/11/first-iphone-application-tutorial.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/5997125956630302576?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/5997125956630302576?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/EhdPVIgR3Jw/first-iphone-application-tutorial.html" title="First iPhone Application - Tutorial" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_QZ6RMUGlHMQ/SxHzPoM7YvI/AAAAAAAAB1A/lPHfoGezubA/s72-c/+WindowApp.jpg" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2009/11/first-iphone-application-tutorial.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHQ3k6eCp7ImA9WxNaEU4.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-828479806135609852</id><published>2009-11-22T20:40:00.000-08:00</published><updated>2009-11-24T23:03:52.710-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-24T23:03:52.710-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><title>Where to start ?!</title><content type="html">So how to go about doing this? Creating your own apps, that is. It can be overwhelming to begin with. So much to learn, and so many different resources. Whether to spend time reading all the documentation, or just jump to all the tutorials and do them one by one? And the verbose Objective-C. It's all confusing.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Having played around with the SDK for the past couple of months, my experience has been that just going through the tutorials will help you make simple apps, however if you want to go farther than that, then you have to spend some time understanding the SDK.  Of course, you cannot master the whole material. So the best way is to do the early tutorials to get a feel for what it is like to make an app; then decide what kind of app you would like to make, and then understand those materials in more detail.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So why yet another blog on iPhone programming? One of the things that is still missing from the blogs out there is elaboration on some of the common questions a beginner faces: "what is the difference between these two ways of achieving this result", "why are are there different kinds of templates", so on and so forth.  Sometimes, I was left with more questions than answers. I had to dig deeper and get answers to some of those.I would definitely like to elaborate on those issues as I learn more. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So in the next few postings, I will start out with a basic app, and also address some of the basic questions regarding that.  We will also understand some of the objective-C programming paradigm. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;iCheers  :-) &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-828479806135609852?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/s30bLsI2K9xyiTeNQS6S59u_MeA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/s30bLsI2K9xyiTeNQS6S59u_MeA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/s30bLsI2K9xyiTeNQS6S59u_MeA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/s30bLsI2K9xyiTeNQS6S59u_MeA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/70Op37P4lME" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/828479806135609852/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2009/11/where-to-start.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/828479806135609852?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/828479806135609852?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/70Op37P4lME/where-to-start.html" title="Where to start ?!" /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2009/11/where-to-start.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8BRHsyfCp7ImA9WxNbGU8.&quot;"><id>tag:blogger.com,1999:blog-5744867393981486696.post-4913988445451180205</id><published>2009-11-21T18:38:00.000-08:00</published><updated>2009-11-22T12:14:15.594-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-22T12:14:15.594-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="computer vision" /><title>necessity meets interest..</title><content type="html">Greetings!&lt;div&gt;&lt;br /&gt;&lt;div&gt;I just started working at an Eye research institute, where I work on developing computer vision algorithms for cell phone applications. The project is intended to help visually challenged / blind people. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We are targeting the iPhone for our project, which basically brings me to this blog. I am an Apple fan without doubt, and iPhone programming was something I wanted to try since its launch.  I am lucky that I am getting to work on something which really excites me as part of my job ...  So as I start learning iPhone programming, I thought it would be nice to share my experiences and thoughts. Hope you all find it useful. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; Happy iProgramming!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5744867393981486696-4913988445451180205?l=iphoneprogrammingfordummies.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/D-CrICOw1t6DOXaSKSyCIP1adsI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D-CrICOw1t6DOXaSKSyCIP1adsI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/D-CrICOw1t6DOXaSKSyCIP1adsI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D-CrICOw1t6DOXaSKSyCIP1adsI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/Fuwi/~4/Wbu4z3Emh8E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://iphoneprogrammingfordummies.blogspot.com/feeds/4913988445451180205/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://iphoneprogrammingfordummies.blogspot.com/2009/11/necessity-meets-interest.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/4913988445451180205?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5744867393981486696/posts/default/4913988445451180205?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/Fuwi/~3/Wbu4z3Emh8E/necessity-meets-interest.html" title="necessity meets interest.." /><author><name>Pannag</name><uri>http://www.blogger.com/profile/18279271342162122959</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://iphoneprogrammingfordummies.blogspot.com/2009/11/necessity-meets-interest.html</feedburner:origLink></entry></feed>

