<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-285238803977778077</atom:id><lastBuildDate>Thu, 19 Dec 2024 03:30:07 +0000</lastBuildDate><category>CodeProject</category><category>IPhone tutorials</category><category>Asp.net Series</category><category>C#</category><category>Client Side Validation</category><category>Code Snippets</category><category>IPhone</category><category>Interview Questions</category><category>JavaScript</category><category>Jquery</category><category>OOP</category><category>PHP</category><category>Web Programming</category><category>mobile web development</category><title>Programing Tech</title><description></description><link>http://programingtech.blogspot.com/</link><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-7155105373625071685</guid><pubDate>Tue, 17 Mar 2015 00:29:00 +0000</pubDate><atom:updated>2015-03-17T05:34:13.005+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Code Snippets</category><category domain="http://www.blogger.com/atom/ns#">PHP</category><category domain="http://www.blogger.com/atom/ns#">Web Programming</category><title>10 Useful PHP Code Snippets  For Programmers</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
I am going to share most useful PHP code snippets that a PHP developer will need at any point in his career. Few of the snippets are shared from my projects and few are taken from useful php websites from internet.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;h4&gt;
  1. Detect HTTPS Server:&lt;/h4&gt;
you can know if your server is HTTPS or not.
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt;if ($_SERVER[&#39;HTTPS&#39;] != &quot;on&quot;) { 
 echo &quot;This is not HTTPS&quot;;
}else{
 echo &quot;This is HTTPS&quot;;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
2. Get User IP Address:&lt;/h4&gt;
The above code will work even in case your client is behind proxy server. Below function to get real IP address of client.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt;function getRealIPAddress()
{
    if (!empty($_SERVER[&#39;HTTP_CLIENT_IP&#39;]))   //check ip from share internet
    {
        $ip=$_SERVER[&#39;HTTP_CLIENT_IP&#39;];
    }
    elseif (!empty($_SERVER[&#39;HTTP_X_FORWARDED_FOR&#39;]))   //to check ip is pass from proxy
    {
        $ip=$_SERVER[&#39;HTTP_X_FORWARDED_FOR&#39;];
    }
    else
    {
        $ip=$_SERVER[&#39;REMOTE_ADDR&#39;];
    }
    return $ip;
}&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
3. Validate email Address:&lt;/h4&gt;
E-mail validation is perhaps the most used validation in web forms, this code will validate email address.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 
function is_valid_email($email)
{
    if(preg_match(&quot;~([a-zA-Z0-9!#$%&amp;amp;&#39;*+-/=?^_`{|}~])@([a-zA-Z0-9-]).([a-zA-Z0-9]{2,4})~&quot;,$email)) {
        return true
    else
        return false;
}  
&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
4. Detect if Ajax Request:&lt;/h4&gt;
scope of this function is to check whether request is done via ajax or not.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 
public function isAjaxRequest(){
    if(!empty($_SERVER[&#39;HTTP_X_REQUESTED_WITH&#39;]) &amp;amp;&amp;amp;  strtolower($_SERVER[&#39;HTTP_X_REQUESTED_WITH&#39;]) == &#39;xmlhttprequest&#39;) {
        // an ajax call
        return true;
    }
    else{
        // non ajax call
        return false;
    }
} 
&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
5. HTTP Redirection in PHP:&lt;/h4&gt;
Use this to Redirect user to other page.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 

 header(&#39;Location: http://www.site.com/index.php&#39;); // add your url

&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
6. Force file Download:&lt;/h4&gt;
Provide files to the user by forcing them to download.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 

function force_download($file)
{
    if ((isset($file))&amp;amp;&amp;amp;(file_exists($file))) {
       header(&quot;Content-length: &quot;.filesize($file));
       header(&#39;Content-Type: application/octet-stream&#39;);
       header(&#39;Content-Disposition: attachment; filename=&quot;&#39; . $file . &#39;&quot;&#39;);
       readfile(&quot;$file&quot;);
    } else {
       echo &quot;No file selected&quot;;
    }
}  
&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
7. Browser Detection script in PHP:&lt;/h4&gt;
Test a string to see if it contains HTML within it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 

 $useragent = $_SERVER [&#39;HTTP_USER_AGENT&#39;];
    echo &quot;&lt;b--&gt;Your User Agent is: &quot; . $useragent;
&lt;/b--&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
8. Check String For Html:&lt;/h4&gt;
Test a string to see if it contains HTML within it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 

function has_html($string){
    if(strlen($string) != strlen(strip_tags($string))){
        return true;
    }
    return false;
} 

var_dump(has_html(&quot;This string doesn&#39;t have any html&quot;));
var_dump(has_html(&quot;This string has a
line break&quot;));
&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
9. Creating and Parsing JSON :&lt;/h4&gt;
Following is the PHP code to create the JSON data format of above example using array of PHP.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 
$json_data = array (&#39;id&#39;=&amp;gt;1,&#39;name&#39;=&amp;gt;&quot;rolf&quot;,&#39;country&#39;=&amp;gt;&#39;russia&#39;,&quot;office&quot;=&amp;gt;array(&quot;google&quot;,&quot;oracle&quot;));
   echo json_encode($json_data);
&lt;/pre&gt;
&lt;br /&gt;
Following code will parse the JSON data into PHP arrays.
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 
$json_string=&#39;{&quot;id&quot;:1,&quot;name&quot;:&quot;Zahid&quot;,&quot;country&quot;:&quot;Pakistan&quot;,&quot;office&quot;:[&quot;hotmail&quot;,&quot;oracle&quot;]} &#39;;
   $obj=json_decode($json_string);
   //print the parsed data
   echo $obj-&amp;gt;name; //displays rolf
   echo $obj-&amp;gt;office[0]; //displays hotmail
&lt;/pre&gt;
&lt;br /&gt;
&lt;h4&gt;
10. PHP Strong Password Generator :&lt;/h4&gt;
This code an generate strong password of any length and any complexity (1 to 5).&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;php&quot; name=&quot;code&quot;&gt; 

function generate_password($length = 8, $complex=3) {
   $min = &quot;abcdefghijklmnopqrstuvwxyz&quot;;
   $num = &quot;0123456789&quot;;
   $maj = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;;
   $symb = &quot;!@#$%^&amp;amp;*()_-=+;:,.?&quot;;
   $chars = $min;
   if ($complex &amp;gt;= 2) { $chars .= $num; }
   if ($complex &amp;gt;= 3) { $chars .= $maj; }
   if ($complex &amp;gt;= 4) { $chars .= $symb; }
   $password = substr( str_shuffle( $chars ), 0, $length );
   return $password;
}
echo generate_password(8);

&lt;/pre&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://visualbx.com/blog/10-useful-php-code-snippets-for-programmers/&quot; target=&quot;_blank&quot;&gt;Please Read More at Source of Original Post &lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://programingtech.blogspot.com/2015/03/10-useful-php-code-snippets-for.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-1432475892316248142</guid><pubDate>Thu, 10 Oct 2013 02:26:00 +0000</pubDate><atom:updated>2015-03-17T04:25:31.678+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Client Side Validation</category><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Jquery</category><title>Useful JavaScript and Jquery Code Snippets</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
JavaScript and Jquery &amp;nbsp;is used on thousands upon thousands of web pages. It’s one of the most common libraries to insert into pages, and it makes DOM manipulation a snap.&amp;nbsp;Using Jquery &amp;nbsp;you will be able to change an existing element within a number of ways as well as: decreasing page load time and thereby giving your end users a better experience when visiting your site.&lt;/div&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify; color: #333333; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;
 I have put together a series of helpful Jquery code snippets you may save and copy to use at your own discretion.&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;strong&gt;1. Allow Numeric Input&lt;/strong&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt; &amp;lt;input type=&quot;text&quot; id=&quot;txtCount&quot; runat=&quot;server&quot; onkeypress=&quot;ValidateNumber(this);&quot;  /&amp;gt; &lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;JavaScript :&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt; 
function ValidateNumber(evt) {  
  evt = (evt) ? evt : window.event  
  var charCode = (evt.which) ? evt.which : evt.keyCode  
  if (charCode &amp;gt; 31 &amp;amp;&amp;amp; (charCode &amp;lt; 48 || charCode &amp;gt; 57)) {  
     return false  
  }  
   return true  
}  &lt;/pre&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Currency Format&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;strong&gt;Usage: &amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;   &amp;lt;input type=&quot;text&quot; id=&quot;txtMinimumPurchase&quot;  value=&quot;0.00&quot; onblur=&quot;this.value=formatCurrencyNumber(this.value);&quot; /&amp;gt;  &lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; JavaScript :&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;function formatCurrencyNumber(num) {  
  num = num.toString().replace(/\$|\,/g, &#39;&#39;);  
  if (isNaN(num))  
  num = &quot;0&quot;;  
  sign = (num == (num = Math.abs(num)));  
  num = Math.floor(num * 100 + 0.50000000001);  
  cents = num % 100;  
  num = Math.floor(num / 100).toString();  
  if (cents &amp;lt; 10)  
  cents = &quot;0&quot; + cents;  
  for (var i = 0; i &amp;lt; Math.floor((num.length - (1 + i)) / 3); i++)  
    num = num.substring(0, num.length - (4 * i + 3)) + &#39;,&#39; +  
    num.substring(num.length - (4 * i + 3));  
    return (((sign) ? &#39;&#39; : &#39;-&#39;) + num + &#39;.&#39; + cents);  
 }    &lt;/pre&gt;
&lt;div&gt;
&lt;strong&gt;3. Number of Days of a Month and Checking Leap Year&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt; 
 function IsleapYear(year) {  
   var isLeapYear = year % 4; // == 0  
   if (isLeapYear == 0)  
       return true;  
   else  
       return false;  
   }  

   function GetNumberofDaysinMonth(month, year) {  
     var noOfDays;  
     switch (parseInt(month)) {  
     case 1:  
     noOfDays = 31;  
     break;  
     case 2:  
     noOfDays = parseInt(IsleapYear(year) == true ? 29 : 28);  
     break;  
     case 3:  
     noOfDays = 31;  
     break;  
     case 4:  
     noOfDays = 30;  
     break;  
     case 5:  
     noOfDays = 31;  
     break;  
     case 6:  
     noOfDays = 30;  
     break;  
     case 7:  
     noOfDays = 31;  
     break;  
     case 8:  
     noOfDays = 31;  
     break;  
     case 9:  
     noOfDays = 30;  
     break;  
     case 10:  
     noOfDays = 31;  
     break;  
     case 11:  
     noOfDays = 30;  
     break;  
     case 12:  
     noOfDays = 31;  
     break;  
     }  
     return noOfDays;  
}   &lt;/pre&gt;
&lt;/div&gt;
&lt;strong&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Scroll Page to a Specific Element&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt; 
1:  function ScrollToElement(el) {  
2:    try {  
3:      $(&#39;html, body&#39;).animate({ scrollTop: $(el).offset().top - 200 }, &#39;slow&#39;);  
4:    }  
5:    catch (err) {  
6:    }  
7:  }  &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;</description><link>http://programingtech.blogspot.com/2013/10/useful-javascript-code-snippets.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-5747039573291374885</guid><pubDate>Sat, 30 Jun 2012 11:31:00 +0000</pubDate><atom:updated>2013-10-10T05:54:23.492+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CodeProject</category><category domain="http://www.blogger.com/atom/ns#">mobile web development</category><title>Best HTML5 Frameworks for Mobile Application Development</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Mobile apps have never been this vital and popular before. With the easy and convenient availability of smart phones etc., the development of mobile phone apps have taken a new high. Users look for highly interactive mobile apps, which contribute towards making their lives interesting and convenient.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Creating web apps and sites for the&amp;nbsp;&lt;b&gt;Mobile Web&lt;/b&gt;&amp;nbsp;has its own sets of challenges and techniques. From UIs optimized for fingers instead of mouse cursors to the bandwidth limitations that most portable personal devices have, developing for mobile devices requires a paradigm shift for those of us who’ve traditionally created products aimed at desktops.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Some common characteristics of JavaScript mobile web development frameworks:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Optimized for touch screen devices:&lt;/b&gt;&amp;nbsp;Fingers as input devices instead of mouse cursors provide an extra set of challenges in user interface design. Mobile web development frameworks provide standard UI elements and event-handling specifically for mobile device platforms.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Cross-platform:&lt;/b&gt;&amp;nbsp;Support for multiple mobile device platforms such iOS and Android allows you to get your app to a wide range of users.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Lightweight:&lt;/b&gt;&amp;nbsp;Because of current bandwidth limitations, a stronger emphasis on lowering file weight is placed into&amp;nbsp;&lt;b&gt;mobile web development frameworks&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Uses HTML5 and CSS3 standards:&lt;/b&gt;&amp;nbsp;Most mainstream mobile devices have web browsers that support HTML5 and CSS3, and so mobile web development frameworks take advantage of new features available in these upcoming W3C specifications for a better user experience.&amp;nbsp;Below, you will find some of the most preferable&amp;nbsp;&lt;b&gt;mobile&lt;/b&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&lt;b&gt;JavaScript frameworks&lt;/b&gt;&amp;nbsp;that can improve your skills as a web developer.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;a data-mce-href=&quot;http://zeptojs.com/&quot; href=&quot;http://zeptojs.com/&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Zepto.js&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;a data-mce-href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/Zepto.jpg&quot; href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/Zepto.jpg&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-37&quot; data-mce-src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/Zepto.jpg&quot; height=&quot;200&quot; src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/Zepto.jpg&quot; style=&quot;border: 0px; cursor: default; display: block; margin-left: auto; margin-right: auto; text-align: justify;&quot; title=&quot;Zepto&quot; width=&quot;450&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Zepto, as the title spoiled it for you, is a&amp;nbsp;&lt;s&gt;mobile&lt;/s&gt;&amp;nbsp;JavaScript framework that rectifies both of the issues mentioned above. It has a very small code base and is feather weight at around 8kb.&amp;nbsp;Zepto’s API is jQuery compatible. If you use jQuery, you already know how to use Zepto.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;a data-mce-href=&quot;http://www.sencha.com/products/touch&quot; href=&quot;http://www.sencha.com/products/touch&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Sencha Touch&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;a data-mce-href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/home-hero-touch.png&quot; href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/home-hero-touch.png&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-34&quot; data-mce-src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/home-hero-touch.png&quot; height=&quot;415&quot; src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/home-hero-touch.png&quot; style=&quot;border: 0px; cursor: default; display: block; margin-left: auto; margin-right: auto; text-align: justify;&quot; title=&quot;home-hero-touch&quot; width=&quot;530&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Sencha Touch is amongst the pioneers in the field of HTML5 frameworks used for developing applications for mobile phones. The power and usability of Sencha Touch lies in the fact that it allows the users to create the applications which function amazingly on the screen of Android and iPhone devices. In fact it is amongst the most preferred choice for creating applications aimed at devices supporting iOS, Android and BlackBerry.&amp;nbsp;Sencha Touch particularly support HTML5, CSS3 and JavaScript. Thus it provides the users with the best of these three words – The multimedia (video and audio component) of HTML5, element backing up local storage, styling effects provided by CSS3 and other amazing features. If you require the application to be visually interactive, Sencha Touch is the best possible option. Besides, Sencha Touch is thoroughly documented and you also win yourself the support of its online community.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;a data-mce-href=&quot;http://phonegap.com/&quot; href=&quot;http://phonegap.com/&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Phonegap&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div data-mce-style=&quot;text-align: center;&quot; style=&quot;color: #333333; font-size: 13px; line-height: 19px; text-align: center;&quot;&gt;
&lt;a data-mce-href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/PhoneGap.jpg&quot; href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/PhoneGap.jpg&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;aligncenter  wp-image-38&quot; data-mce-src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/PhoneGap.jpg&quot; height=&quot;232&quot; src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/PhoneGap.jpg&quot; style=&quot;border: 0px; cursor: default; display: block; margin-left: auto; margin-right: auto; text-align: justify;&quot; title=&quot;PhoneGap&quot; width=&quot;523&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;PhoneGap&lt;/b&gt;&amp;nbsp;is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. PhoneGap leverages web technologies developers already know best... HTML and JavaScript.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;PhoneGap will use standards-based web technologies to bridge web applications and mobile devices. Plus, because PhoneGap apps are standards compliant, they’re future-proofed to work with browsers as they evolve.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-size: 13px; line-height: 19px;&quot;&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;a data-mce-href=&quot;http://jquerymobile.com/&quot; href=&quot;http://jquerymobile.com/&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;jQuery Mobile&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;a data-mce-href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/jquery-mobile-devices-beta.png&quot; href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/jquery-mobile-devices-beta.png&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-36&quot; data-mce-src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/jquery-mobile-devices-beta.png&quot; height=&quot;377&quot; src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/jquery-mobile-devices-beta.png&quot; style=&quot;border: 0px; cursor: default; display: block; margin-left: auto; margin-right: auto; text-align: justify;&quot; title=&quot;jquery-mobile-devices-beta&quot; width=&quot;380&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;jQuery mobile framework takes the &quot;write less, do more&quot; mantra to the next level: Instead of writing unique apps for each mobile device or OS, the jQuery mobile framework allows you to design a single highly-branded web site or application that will work on all popular smartphone, tablet, and desktop platforms&amp;nbsp;A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: justify;&quot;&gt;
&lt;a data-mce-href=&quot;http://www.appcelerator.com/products/titanium-mobile-application-development/&quot; href=&quot;http://www.appcelerator.com/products/titanium-mobile-application-development/&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Titanium&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div data-mce-style=&quot;text-align: center;&quot; style=&quot;text-align: center;&quot;&gt;
&lt;a data-mce-href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/titanium.png&quot; href=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/titanium.png&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;aligncenter  wp-image-39&quot; data-mce-src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/titanium.png&quot; height=&quot;238&quot; src=&quot;http://rashoolab.comze.com/wp-content/uploads/2012/06/titanium.png&quot; style=&quot;border: 0px; cursor: default; display: block; margin-left: auto; margin-right: auto; text-align: justify;&quot; title=&quot;titanium&quot; width=&quot;566&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Appcelerator is the first mobile platform to combine the flexibility of open source development technologies with the power of cloud services.&amp;nbsp;Although we are talking about HTML5 framworks for developing mobile applications, here is one JavaScript based framework which deserves due attention. The interface of Titanium is based on JavaScript and its framework contains the native code modules. It can be used to render the web skills into native apps. The apps acts as if they have been coded in Objective C, which is vital of iPads and iPhones, or Java, which is required for developing Android apps.&amp;nbsp;Titanium plays an important role in building apps which are social, easy to use, interactive and scalable.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://programingtech.blogspot.com/2012/06/best-html5-frameworks-for-mobile.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-6567880472762373729</guid><pubDate>Mon, 01 Aug 2011 09:16:00 +0000</pubDate><atom:updated>2011-10-22T01:47:41.374+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.net Series</category><category domain="http://www.blogger.com/atom/ns#">Interview Questions</category><title>Asp interview questions</title><description>&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Q 1: What is the difference between web.config and machine.config ?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 1;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;Answer:&lt;/span&gt;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;The settings made in the web.config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net applications configured on that server.&lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;margin: auto 0in;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Q 2: What are the different types of sessions in ASP.Net? Name them.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;&lt;div class=&quot;marginnone&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Answer: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Session Management can be achieved in two ways:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;1)InProc&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;2)OutProc &amp;nbsp;(again two types State Server and SQL Server)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #323232; font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;InProc&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Advantage:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;1) Faster as session resides in the same process as the application&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;2) No need to serialize the data &lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 6pt 0in;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Disadvantage:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
1) Will degrade the performance of the application if large chunk of data is stored&lt;br /&gt;
2) On restart of IIS all the Session info will be lost&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 6pt 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;State Server&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Advantage:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
1) Faster than SQL Server session management &lt;br /&gt;
2) Safer than InProc. As IIS restart &lt;br /&gt;
won&#39;t effect the session data&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 6pt 0in;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Disadvantage:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
1) Data need to be serialized&lt;br /&gt;
2) On restart of ASP.NET State Service session info will be lost&lt;br /&gt;
3)Slower as compared to InProc&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 6pt 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;SQL Server&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Advantage:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
1) Reliable and Durable&lt;br /&gt;
2) IIS and ASP.NET State Service &lt;br /&gt;
restart won&#39;t effect the session data&lt;br /&gt;
3) Good place for storing large chunk of data&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 6pt 0in 10pt;&quot;&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Disadvantage:&lt;/span&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;&lt;br /&gt;
1) Data need to be serialized&lt;br /&gt;
2) Slower as compare to InProc and State Server&lt;br /&gt;
3)Need to purchase Licensed &lt;br /&gt;
version of SQL Server&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.5pt; margin: 6pt 0in 10pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Q 3: What is the difference between autopostback and ispostback?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Answer:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Autopostback - Property of the control&lt;br /&gt;
IsPostback - Property of the Page class&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Autopostback - get and set property to control postback on changes made for control.&lt;br /&gt;
for e.g.&lt;br /&gt;
this.ListBox1.AutoPostBack = true; &lt;br /&gt;
whenever user will select item, the page will get post back.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;IsPostback - get property of the Page class, to check if page is post back i.e. if it is true then page has already executed Init function of the page else it is first time the page has requested to be executed.&lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;margin: auto 0in;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Q 4: State the difference between a Session and an Application&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt; text-align: justify;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;Answer&lt;/span&gt;: &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt; line-height: 115%;&quot;&gt;Basically, in &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt; line-height: 115%;&quot;&gt;session state&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt; line-height: 115%;&quot;&gt;&amp;nbsp;It allows you to store&amp;nbsp;any type of data in memory on the server. The information is protected, because it is never&amp;nbsp;transmitted to the client, and uniquely bound to a specific session. Every client that&amp;nbsp;accesses the application has a different session and a distinct collection of information. Instance of every user is different which is differentiated by a session ID.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;While in case of an &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;application state&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;,&amp;nbsp;it allows you to store global objects that can be accessed by any client. That is the instance for every user is same.&lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;margin: auto 0in;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Q 5: what is boxing and unboxing?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;&lt;div class=&quot;marginnone&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Answer: &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;marginnone&quot; style=&quot;margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;u&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Boxing&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt; is what happens when a value-type object is assigned to a reference-type variable.&lt;/span&gt;&lt;br /&gt;
&lt;u&gt;&lt;span style=&quot;color: #1f497d; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Unboxing&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt; is what happens when a reference-type variable is assigned to a value-type variable. &lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;margin: auto 0in;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Q 6: what is Reflection?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Answer: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;Reflection is a collection of classes which allow you to query assembly (classes/objects) metadata at runtime. Using reflection you can also create new types and their instances at runtime and invoke methods on these new type instances.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;There are other uses for reflection. Compilers for languages such as JScript use reflection to construct symbol tables. &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #323232; font-family: Arial, sans-serif; font-size: 10.5pt;&quot;&gt;In .Net the classes in the &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.aspx&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span style=&quot;color: #3b5998;&quot;&gt;System.Runtime.Serialization&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; namespace use reflection to access data and to determine which fields to persist. You can use System.Reflection.Emit namespace to dynamically generate types.&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;h1 style=&quot;margin: auto 0in;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;margin: auto 0in;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;/span&gt;&lt;/h1&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 10pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 1;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</description><link>http://programingtech.blogspot.com/2011/08/aspnet-interview-questions-and-answers.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-5218678591089139238</guid><pubDate>Tue, 28 Jun 2011 20:49:00 +0000</pubDate><atom:updated>2011-06-29T17:54:50.585+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">OOP</category><title>1. C# (OOP Concepts part 1)</title><description>&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span class=&quot;header21&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Introducing Classes and Objects&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span class=&quot;header21&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;A &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;class&lt;/b&gt; defines constituent members which enable these class instances to have &lt;i&gt;state&lt;/i&gt; and &lt;i&gt;behavior.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;i&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;e.g Vehicle class defined as:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Vehicle&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; Name;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; vehicleNo;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ShowVehicleInformation()&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Name);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.Write(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.vehicleNo);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2.5in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;Here Vehicle is some thing which has some chracteristics and behaviors.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;An &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;object &lt;/b&gt;is a building block of an OOP application. This building block encapsulates part of the&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;application, which may be a process, a chunk of data, or a more abstract entity. Objects in C# are created from types, just like the variables you have seen already. The type of an object is known by a special name in OOP, its class&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;e.g a variable is declared as&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; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1.5in; mso-layout-grid-align: none; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; myNumber = 10;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;Similarly an object is declared as &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Vehicle&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; car = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Vehicle&lt;/span&gt;();&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;Here car is an object of Vehicle class. Vehicle can also be called a user defined data type.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Properties and Fields&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;Properties and fields&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt; provide access to the data contained in an object. This object data is what differentiates separate objects, because it is possible for different objects of the same class to have different values stored in properties and fields.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;Both fields and properties are typed, so you can store information in them as string values, as int values, and so on.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;e.g&amp;nbsp; car object of Vehicle class has properties:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1.5in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; Name;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 1.5in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; vehicleNo;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Methods&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;Methods&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt; are used to provide access to the object’s functionality.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif;&quot;&gt;e.g &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ShowVehicleInformation()&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.Write(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Name);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.Write(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.vehicleNo);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 2in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Access Modifiers&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;All types and type members have an accessibility level, which controls whether they can be used from other code in your assembly or other assemblies. You can use the following access modifiers to specify the accessibility of a type or member when you declare it:&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #1364c4; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;The type or member can be accessed by any other code in the same assembly or another assembly that references it.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #1364c4; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;The type or member can be accessed only by code in the same class or struct.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #1364c4; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;The type or member can be accessed only by code in the same class or struct, or in a class that is derived from that class.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #1364c4; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;internal&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: black; font-family: Arial, sans-serif; font-size: 10pt;&quot;&gt;The type or member can be accessed by any code in the same assembly, but not from another assembly.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-outline-level: 1; vertical-align: top;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Default access&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 24pt;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A default access level is used if no access modifier is specified in a member declaration. The following list defines the default access modifier for certain C# types:&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;enum: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The default and only access modifier supported is public.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;class: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The default access for a class is private. It may be explicitly defined using any of the access modifiers.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;interface: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The default and only access modifier supported is public.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;struct: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The default access is private with public and internal supported as well.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The default access may suffice for a given situation, but you should specify the access modifier you want to use to ensure proper application behavior.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; vertical-align: top;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Note: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Interface and enumeration members are always public and no access modifiers are allowed.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://programingtech.blogspot.com/2011/06/1-c-oop-concepts.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-8665600177145914776</guid><pubDate>Tue, 28 Jun 2011 18:19:00 +0000</pubDate><atom:updated>2011-06-28T23:25:21.093+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Asp.net Series</category><title>Validation Controls (Asp.net Series # 1)</title><description>&lt;strong&gt;Type of Validation Control:&lt;/strong&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.requiredfieldvalidator.aspx&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;RequiredFieldValidator&lt;/span&gt;&lt;/a&gt;&amp;nbsp;:&amp;nbsp; Ensures that the user does not skip an entry. e.g &amp;nbsp;Mandatory Fields &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.comparevalidator.aspx&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;CompareValidator&lt;/span&gt;&lt;/a&gt;: Compares a user&#39;s entry against a constant value, against the value of another control (using a comparison operator such as less than, equal, or greater than), or for a specific data type. &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.rangevalidator.aspx&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;RangeValidator&lt;/span&gt;&lt;/a&gt;: Checks that a user&#39;s entry is between specified lower and upper boundaries. You can check ranges within pairs of numbers, alphabetic characters, and dates.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.regularexpressionvalidator.aspx&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;RegularExpressionValidator&lt;/span&gt;&lt;/a&gt;: Checks that the entry matches a pattern defined by a regular expression. This type of validation enables you to check for predictable sequences of characters, such as those in e-mail addresses, telephone numbers, postal codes, and so on.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.aspx&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;CustomValidator&lt;/span&gt;&lt;/a&gt;: Checks the user&#39;s entry using validation logic that you write yourself. This type of validation enables you to check for values derived at run time.&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;strong&gt;Working Example of Validation Control:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;a href=&quot;http://www.ziddu.com/download/15497323/BasicFormControlsAndValidations.rar.html&quot;&gt;Download Full Example Here&lt;/a&gt;&lt;/strong&gt;</description><link>http://programingtech.blogspot.com/2011/06/aspnet-validation-control.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-523974606973084803</guid><pubDate>Sun, 15 May 2011 19:40:00 +0000</pubDate><atom:updated>2011-06-23T14:18:33.766+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CodeProject</category><category domain="http://www.blogger.com/atom/ns#">IPhone tutorials</category><title>IPhone Development Basics (Part 2)</title><description>&lt;div style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;
&lt;span id=&quot;internal-source-marker_0.809341964777559&quot; style=&quot;background-color: transparent; color: #004fa9; font-family: Verdana; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Exploring the Objective-C File Structure&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #004fa9; font-family: Verdana; font-size: 12pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Header/Interface Files&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Creating a class creates two different files: an interface (or header) file (.h) and an implementation file (.m). The interface file is used to define a list of all of the methods and properties that your class will be using.The implementation file, on the other hand, is where you’ll go to write the code that makes everything defined in the header file work.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;img height=&quot;211px;&quot; src=&quot;https://lh5.googleusercontent.com/RGbAJm3Hcwh5BipgnGg8d7EGOTiKulMvx7-jBf5D762xpY-Vmnixp9VaGk6ZGvMuqgKA5Rw9xT8T9DmN1S2IW7vfTLkUjiBT5_cm5wcUFVIgvUCEDPM&quot; width=&quot;619px;&quot; /&gt;&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The #import Directive:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Directives are commands that are added to your files that help Xcode and its associated tools build your application.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The @interface Directive and Instance Variables&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Line 3 uses the @interface directive to begin a set of lines (enclosed in {} braces) to describe all the instance variables that your class will be providing.&lt;/span&gt;&lt;img height=&quot;68px;&quot; src=&quot;https://lh6.googleusercontent.com/VUL5Pl2HCK1AbuGPL12fXZDczCv66yHenyWmfECDTwj7AdtRv3cdJStgAjAAulQWR8UJ3PZqiziIMo9QHN-FUn7NKI0qS9VU17tdwpu8lzkqtWbf3Aw&quot; width=&quot;360px;&quot; /&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #004ea8; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;What’s a Protocol: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Protocols are a unique feature of Objective-C that sound complicated but really aren’t. Sometimes you will come across features that require you to write methods to support their use—such as providing a list of items to be displayed in a table. The methods that you need to write are grouped together under a common name—this is known as a “protocol.”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #004ea8; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Defining Methods&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Lines 8 and 10 declare two methods that need to be implemented in the class:&lt;/span&gt;&lt;img height=&quot;58px;&quot; src=&quot;https://lh4.googleusercontent.com/NNJTLgpafT08CP8X1bl0C--5fXkMKdoBr5mFR9KM2OowBQveiFohkejdTOoP-_0ZwOepQxPo7wDgtX79MzJ7Sn4xv7B2HRk_CXJUsdmEqRd2aSLXlos&quot; width=&quot;565px;&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The @property Directive:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The @property directive is used in conjunction with another command called syn- thesize in the implementation file to simplify how you interact with the instance variables that you’ve defined in your interface.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;img height=&quot;26px;&quot; src=&quot;https://lh3.googleusercontent.com/4ORNnDikn_tFuGO5k_7h3RsofOXURJj9yqfTSEXj6UuT59dsu04Xftq2gqbD-ZH5mrOmRssbQ6T7CB5o7Jdd3Pi-fSxsL4crpzXvj1VhHdp8Lz-boj8&quot; width=&quot;367px;&quot; /&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Ending the Interface File:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;To end the interface file, add @end on its own line. This can be seen on line 14 of our example file:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;img height=&quot;23px;&quot; src=&quot;https://lh3.googleusercontent.com/Nc47ioTujLTOC22zBt1ip2jTPLIGpurNEeTj14wvCD8CKK2Bwj3bt7APqNHCPQz9BrWjANYYVKUEwyNqPvTxTlHvaevwZaBYhhNKK0WMq2aucDY9Ldk&quot; width=&quot;382px;&quot; /&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Implementation Files&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;After you’ve defined your instance variables (or properties!) and methods in your interface file, you need to do the work of writing code to implement the logic of your application. The implementation file (.m) holds all of the “stuff” that makes your class work.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;img height=&quot;219px;&quot; src=&quot;https://lh4.googleusercontent.com/cQfIvFe6SLGc4k6ImeOCplrgHLkZWxyAjemv8-euowrRutsY9eRXEnHI14bJ18x-CrnxuOaizTOXH0Xh3VH4G40X7s-m0lf4l-XEcUdqlsodBC0euZ0&quot; width=&quot;597px;&quot; /&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The #import Directive:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The #import directive kicks things off in line 1 by importing the interface file associated with the class:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;img height=&quot;24px;&quot; src=&quot;https://lh4.googleusercontent.com/W-2UnDTi2PKlgthWYvZqpiSj4Q2k1DgXunUdtLN3ng5Jl8LaBHXDa-22MxCnNb7dQ_778WvCpk9sVF_yk0HGdWsb-sB8FIdo9mkiXQS9faTVsxsYzj4&quot; width=&quot;542px;&quot; /&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The @implementation Directive&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The implementation directive, shown in line 3, tells Xcode what class the file is going to be implementing.&lt;/span&gt;&lt;img height=&quot;19px;&quot; src=&quot;https://lh6.googleusercontent.com/zKOOFZlgrfROCzuJn7b1tQbfXcnf0PjxMxzAY8CfYG7HU-0xnMPxC8J6ydfpClW2-hG-pg08bWQsjyk8LKWUJdoT9IaVFdWIEJd4HVH0FVOnE4KwnLk&quot; width=&quot;531px;&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The @synthesize Directive:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In line 5, we use the @synthesize directive to, behind the scenes, generate the code for the getters and setters of an instance variable:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;img height=&quot;22px;&quot; src=&quot;https://lh5.googleusercontent.com/gw69PrmW0DU-4bpfTbXmqmMvrzH2DrmQ_n_d35pQGkUspn6OBznEwDk8KbAznKDay6LygkKJ0xblznPKtaxT4z3ikq5QJN0c0I4UK8ZDQ6cvRboqT6s&quot; width=&quot;433px;&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Method Implementation: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;T&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;he implementation file must restate the method definitions, but, rather than ending them with a semicolon (;), a set of curly braces, {}, is added at the end, as shown in lines 7–9 and 11–13. All the magic of your programming will take place between these braces:&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;img height=&quot;113px;&quot; src=&quot;https://lh4.googleusercontent.com/GxvhGRlMiKkNLEPEmpX0B8HB-6kQoWc305OAgNQNEYwv1mjR_DnK3nhxealaSjtyjLKNDEENW4c2s8gnuqERzydcFBD16S-uNveDnkj_Y2o2nOoIYNg&quot; width=&quot;573px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=program076-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1430216263&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&amp;nbsp;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=program076-20&amp;amp;l=bil&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1430216263&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=program076-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1430218150&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://programingtech.blogspot.com/2011/05/iphone-development-basics-part-2.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/RGbAJm3Hcwh5BipgnGg8d7EGOTiKulMvx7-jBf5D762xpY-Vmnixp9VaGk6ZGvMuqgKA5Rw9xT8T9DmN1S2IW7vfTLkUjiBT5_cm5wcUFVIgvUCEDPM=s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-3875000840703456581</guid><pubDate>Sun, 10 Apr 2011 14:04:00 +0000</pubDate><atom:updated>2015-03-17T04:32:16.812+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CodeProject</category><category domain="http://www.blogger.com/atom/ns#">IPhone</category><category domain="http://www.blogger.com/atom/ns#">IPhone tutorials</category><title>IPhone Development Basics (Part 1)</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: transparent;&quot;&gt;
&lt;div id=&quot;internal-source-marker_0.8560976881999522&quot; style=&quot;margin-bottom: 0pt; margin-left: -13.5pt; margin-top: 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 12pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Object Oriented Programming Overview&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;OOP Vocabulary:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Class:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; defines the grouping of data and code, the “type” of an object&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Instance:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; a specific allocation of a class&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Method:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; a “function” that an object knows how to perform&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Instance Variable:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; a specific piece of data belonging to an object&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Encapsulation:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; keep implementation private and separate from interface&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Polymorphism:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; different objects, same interface&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Inheritance:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; hierarchical organization, share code, customize or extend behavior&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;s&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img alt=&quot;Cocoa Framework&quot; height=&quot;171&quot; name=&quot;Cocoa Framework&quot; src=&quot;https://lh3.googleusercontent.com/s8XAx0vKhx0ZNgB7HO_0BZQFJn5UVOJNzrg7OVW1zpU9vj3JffINVWbl8AE-RIuIoBxuNuSdiJx6W7uZasEIYsPxRBIsJuZHw0GKHbBb3uEbYHutc7s&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Cocoa Framework&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Objective-C:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Objective-C was created in the 1980s and is an extension of the C language. It adds many additional features to C and, most important, an OOP structure. Objective-C is primarily used for developing Mac and iOS applications and has attracted a devoted group of fol- lowers who appreciate its capabilities and syntax.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #004fa9; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #004fa9; font-family: Verdana; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Objective-C Programming Basics&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #004fa9; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;This section describes the basic Objective-C Syntax:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Declaring variables&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Allocating and initializing objects.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Using an object’s instance methods.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Making decisions with expressions.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Branching and looping&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Declaring Variables:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Instance variables store information that is available across all the methods in your class. Most commonly, you’ll be declaring several variables at the start of your methods, using them for various calculations, and then getting rid of them when you’ve finished with them.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Whatever the purpose, you’ll declare your variables using this syntax:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;Type&amp;gt; &amp;lt;Variable Name&amp;gt;;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The type is either a primitive data type or the name of a class that you want to instantiate and use.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Primitive Data Types: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Primitive data types are defined in the C language and are used to hold very basic values. Common types you’ll encounter include the following:&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;int: Integers (whole numbers such as 1, 0, and -99) &lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;float: Floating-point numbers (numbers with decimal points in them)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;double: Highly precise floating-point numbers that can handle a large number of digits&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Object Data Types and Pointers: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;To declare a variable as an object of a specific class, we must declare the variable as a pointer to an object. A pointer references the place in memory where the object is stored, rather than a value. To declare a vari- able as a pointer, prefix the name of the variable with an asterisk. For example, to declare a variable of type NSString with the intention of holding a user’s name, we might type this:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;NSString &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;*userName;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Once declared, you can use the variable without the asterisk. It is only used in the declaration to identify the variable as a pointer to the object.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Allocating, Initializing, and Releasing Objects&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Before an object can be used, memory must be allocated and the contents of the object initialized. This is handled by sending an alloc message to the class that you’re going to be using, followed by an init message to what is returned by alloc. The syntax you’ll use is this:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[[&amp;lt;class name&amp;gt; alloc] init];&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;For example, to declare and create a new instance of UILabel class, you could use the following code:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UILabel &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;*myLabel; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;myLabel=[[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UILabel &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;init&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Once allocated and initialized, the object is ready to use.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Convenience Methods: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;When we initialized the UILabel instance, we did create a usable object, but it doesn’t yet have any of the additional information that makes it useful. Properties such as what the label should say or where it should be shown on the screen have yet to be set. We would need to use several of the object’s other methods to really make use of the object.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Apple’s classes often provide a special initialization method called a convenience method. These methods can be invoked to setup an object with a basic set of properties so that it can be used almost immediately.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;For example, the NSURL class, which you’ll be using later on to work with web addresses, defines a convenience method called initWithString.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; To declare and initialize an NSURL object that points to the website. we might type the following:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;NSURL &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;*iPhoneURL; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;iPhoneURL=[[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;NSURL &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;alloc&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;initWithString&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”http://www.teachyourselfiphone.com/”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Without any additional work, we’ve allocated and initialized a URL with an actual web address in a single line of code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Using Methods and Messaging&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;To send an object a message, give the name of the variable that is referencing the object followed by the name of the method—all within square brackets. If you’re using a class method, just provide the name of the class rather than a variable name:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[&amp;lt;object variable or class name&amp;gt; &amp;lt;method name&amp;gt;];&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Things start to look a little more complicated when the method has parameters. A single parameter method call looks like this:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[&amp;lt;object variable&amp;gt; &amp;lt;method name&amp;gt;:&amp;lt;parameter value&amp;gt;];&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;An actual example of using a multiple parameter method looks like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;NSString &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;*userName;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[userName &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;compare&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”John” &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;options&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:NSCaseInsensitive];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Expressions and Decision Making: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;E&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;very decision in an app boils down to a “yes” or “no” result based on evaluating a set of tests. These can be as simple as comparing two values, to something as complex as checking the results of a complicated mathematical calculation. The combination of tests used to make a decision is called an expression.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Making Decisions with if-then-else and switch Statements: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The most common way of defining these different execution paths is with an if-then-else statement:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;if (&amp;lt;expression&amp;gt;) { &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// do this, the expression is true.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;} &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;else { &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// the expression isn’t true, do this instead!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;For example, consider the comparison we used earlier to check a userName NSString variable to see whether its contents were set to a specific name. If we want to react to that comparison, we might write the following:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;If ([userName &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;compare&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”John”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;]) { &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userMessage=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”I like your name”;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;} &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;else &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{ &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userMessage=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”Your name isn’t John, but I still like it!”;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #6c6e70; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;A switch statement checks a variable for a value, and then executes different blocks of code depending on the value that is found:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;switch (&amp;lt;numeric value&amp;gt;) { &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &amp;lt;numeric option 1&amp;gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// The value matches this option&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;break; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &amp;lt;numeric option 2&amp;gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// The value matches this option&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;break; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;default:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 108pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// None of the options match the number.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Applying this to a situation where we might want to check a user’s age (stored in userAge) for some key milestones and then set an appropriate userMessage string if they are found, the result might look like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #7e42a4; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;int &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userAge=18;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;switch &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(userAge) {&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #0046a5; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;18&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userMessage=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”Congratulations, you’re an adult!”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #0046a5; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;21&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userMessage=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”Congratulations, you can drink champagne!”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #0046a5; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userMessage=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”You’re half a century old!”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;userMessage=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”Sorry, there’s nothing special about your age.”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Repetition with Loops: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;A loop defines the start and end of several lines of code. As long as the loop is running, the program executes the lines from top to bottom, and then restarts again from the top. The loops you’ll use are of two types: count-based and condition- based.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In a count-based loop, the statements are repeated a certain number of times. In a condition-based loop, an expression determines whether a loop should occur. The count-based loop you’ll be using is called a for loop, with this syntax: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;for (&amp;lt;initialization&amp;gt;;&amp;lt;test condition&amp;gt;;&amp;lt;count update&amp;gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 180pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// Do this, over and over!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 180pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Example&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; int &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;count;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(count=&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #0046a5; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;count&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #0046a5; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;count=count+&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #0046a5; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #009b38; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// Do this, 50 times!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In a condition-based loop, the loop continues while an expression remains true. There are two variables of this loop type that you’ll encounter, while and do-while:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;while (&amp;lt;expression&amp;gt;) &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{ &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Do this, over and over, while the expression is true!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;and&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;do { &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// Do this, over and over, while the expression is true!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;} while (&amp;lt;expression&amp;gt;);&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;For example, suppose you are asking users to input their names and you want to keep prompting them until they type John. You might format a do-while loop like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;do &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{ &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt; text-indent: 36pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #009b38; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;// Get the user’s input in this part of the loop&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;} &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ca009a; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;while &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(![userName &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #452283; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;compare&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ff0014; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@”John”&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;]);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-left: 72pt; margin-top: 0pt;&quot;&gt;
&lt;span style=&quot;background-color: transparent; color: #241e20; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://9im6jjs425770o267f7u4gprd0l4tbn2-a-blogger-opensocial.googleusercontent.com/gadgets/ifr?url=http%3A%2F%2Fwms.assoc-amazon.com%2FGoogleGadgets%2Famzn_monetize.xml&amp;amp;container=blogger&amp;amp;view=editor-sidebar&amp;amp;lang=en&amp;amp;country=ALL&amp;amp;sanitize=0&amp;amp;v=86ab91c82034de2b&amp;amp;libs=core%3Adynamic-height%3Agoogle.blog%3Agoogle.blog.editor%3Alocked-domain%3Arpc%3Asetprefs%3Asettitle%3Aviews&amp;amp;parent=http%3A%2F%2Fwww.blogger.com%2F&amp;amp;mid=1291412489635#&quot;&gt;LINK+IMAGE&lt;/a&gt;            &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://programingtech.blogspot.com/2011/04/iphone-development-basics-part-1.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/s8XAx0vKhx0ZNgB7HO_0BZQFJn5UVOJNzrg7OVW1zpU9vj3JffINVWbl8AE-RIuIoBxuNuSdiJx6W7uZasEIYsPxRBIsJuZHw0GKHbBb3uEbYHutc7s=s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-285238803977778077.post-1763959267728902164</guid><pubDate>Sat, 09 Apr 2011 17:45:00 +0000</pubDate><atom:updated>2011-04-10T15:26:55.355+05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">IPhone tutorials</category><title>Writing Your First iPhone Program</title><description>&lt;div style=&quot;background-color: transparent;&quot;&gt;&lt;div id=&quot;internal-source-marker_0.9034373462200165&quot; style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The Apple iPhone is becoming a full-fledged development platform. It&#39;s reliance on desktop- class operating system software is allowing it to become the most powerful mobile platform available. Here is how you can get in on the action, even if you have never written a line of code before! First, you need an Apple computer with an Intel processor and Mac OS X Leopard. I&#39;m sure that Apple would be happy to help you with this step. We&#39;re going to jump right into making a program, but first we need to define a few terms.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Software Development Tools&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Apple&#39;s IDE is called Xcode, and is available for free on Apple&#39;s software development website to anyone who registers as a developer. Apple has repackaged Xcode with iPhone development resources and called it the iPhone SDK.&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Registering as a Developer and Downloading Xcode&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Open your favorite web browser and go to &lt;/span&gt;&lt;a href=&quot;http://developer.apple.com/iphone/program&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;http://developer.apple.com/iphone/program.&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: #120097; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Scroll to the bottom of the page and click “Download the Free SDK”.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “Create Apple ID”.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Input your information and click “Create”.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;In the downloads section, click “iPhone SDK”. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Installing Xcode&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Double click the DMG and you will be presented with a window containing the Xcode installation package.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Double click iPhone SDK.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;follow the installation instructions. The default &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;selections for each screen are fine.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Running Xcode&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Because Xcode depends on many system-level services and includes many programs, it does not install into the Applications folder. To run Xcode and other tools thatcome with the iPhone SDK:&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Double-click “Macintosh HD” on your desktop. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Double-click “Developer” &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Double-click “Applications” &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Double-click “Xcode”&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Creating Your First Project&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Xcode&#39;s user interface, like most Mac applications, is composed of many windows that are tied together with the main menu at the top of the screen. The first time Xcode is run, it will present a welcome screen. These screens can be helpful, but not at the moment. Close them and we will create your first iPhone project.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “File -&amp;gt; New Project”. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click the “View-Based Application” icon. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “Choose”. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Navigate to a location where you would like to store &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;your iPhone projects. In the text box labeled “Save As:” type “HelloWorld”. &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click “Save”.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: small; white-space: normal;&quot;&gt;&lt;img height=&quot;345px;&quot; src=&quot;https://lh3.googleusercontent.com/P_c_40LTY7F7F6Ej8i8PheS84t6-vfQhJ0Vs73T7GitkOjgx9Qw6aETsq_-XsoHh2cqAp02A25KmNYvYdv8NSnW0m6-g4W3-HHEYOmAUCpBA83Imc2Y&quot; width=&quot;469px;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Writing and Compiling Your Program&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The window you are seeing now is the main IDE program. It has the editor and controls for the compiler built into it. We will now add the code to create a button and a button action.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Expand the “Classes” group on the left side by clicking on the small triangle next to it.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Click on “HelloWorldViewController.m”. &lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Scroll down to the second green code region. This is a code comment showing where to put your code if you are creating your user interface using code. &lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Put the following Code in ViewDidLoad Method&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img height=&quot;436px;&quot; src=&quot;https://lh3.googleusercontent.com/HRHVk1AQcXeBZgzlvLfrjmK4y4HDeoueoz1VSd4dhTXKvClWYq3mvXih-KCB01c_N3EIeXp6AAzKavw-Q058tYDHmAAIXJW-Ybv04O1HcD_u4_AMvjQ&quot; width=&quot;617px;&quot; /&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Add This code to viewDidLoad method&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;- (&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;)viewDidLoad { &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;super &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;viewDidLoad&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: #7e1ead; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIButton&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;* helloButton = [&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #7e1ead; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIButton &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;buttonWithType&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIButtonTypeRoundedRect&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;]; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;helloButton&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;.bounds&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CGRectMake&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #3800de; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;0.0f&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #3800de; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;0.0f&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #3800de; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;200.0f&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #3800de; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;50.0f&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;helloButton.center = &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;.view.center;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;helloButton.font = [&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #7e1ead; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIFont &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;boldSystemFontOfSize&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #3800de; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;30.0f&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[helloButton &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;setTitle&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ea0008; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@&quot;Hello&quot; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;forState&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIControlStateNormal&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];[helloButton &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;addTarget&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;self &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@selector&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #1a5b5e; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;helloButtonPressed&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:) &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;forControlEvents&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIControlEventTouchUpInside&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;.view &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;addSubview&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:helloButton];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Add this Method to the file also&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;- (&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) helloButtonPressed:(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #d200a5; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;)sender {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;[(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #7e1ead; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIButton&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;*)sender &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;setTitle&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #ea0008; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@&quot;Hello World!&quot; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;forState&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #470085; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;UIControlStateNormal&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Now Your Files Looks As&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img height=&quot;436px;&quot; src=&quot;https://lh4.googleusercontent.com/h1xYY9wWDTINSZCXt7fJdfPNwKIJ4gIBxaOGyEqsQYomIeZM3bariV4ccrK5Apg9OVm-Y8ogTC8EK_G75zZhHST1VqaswF8ZwqLv2qBO8RKd3TgiCfg&quot; width=&quot;614px;&quot; /&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 10pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Running Your Program&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0pt; margin-top: 0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Verdana; font-size: 10pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Now we have some code written for the compiler to compile and the simulator to run. To compile your code and start the simulator running your program, press the “Build and Go” button at the top. If asked to save your changes, press “Save All”. The simulator will start up and run your program. Congratulations on writing your first iPhone program!&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: small; font-weight: normal; white-space: normal;&quot;&gt;&lt;img height=&quot;692px;&quot; src=&quot;https://lh6.googleusercontent.com/zp6eGM9bICjPlbHjj7NDg4cEHrgq8LzR7FeXgJPxTWOC0f7JfNV4FjQbw5ZJBiz8XktoDYt4Fzpaf2eUyxSsXkxa8rrZtLphgR1dHYJTPwROU9rbEgQ&quot; width=&quot;375px;&quot; /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://programingtech.blogspot.com/2011/04/writing-your-first-iphoneprogram.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh3.googleusercontent.com/P_c_40LTY7F7F6Ej8i8PheS84t6-vfQhJ0Vs73T7GitkOjgx9Qw6aETsq_-XsoHh2cqAp02A25KmNYvYdv8NSnW0m6-g4W3-HHEYOmAUCpBA83Imc2Y=s72-c" height="72" width="72"/><thr:total>4</thr:total></item></channel></rss>