<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-2987916728889265715</id><updated>2024-09-10T22:03:20.387+07:00</updated><category term="Cocoa"/><category term="Object C"/><category term="Learn Object-C"/><category term="App Purchase"/><category term="Cydia"/><title type='text'>Apple Developer</title><subtitle type='html'>Hi, Iam a Developer, I like mobile &amp;amp; website. So I collect a lot of information about new technology. I hope my blog can help you so much.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-5197934556793513424</id><published>2012-05-12T10:27:00.000+07:00</published><updated>2012-05-12T10:27:44.260+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="App Purchase"/><title type='text'>Testing iOS 4 Apps on the iPhone – Developer Certificates and Provisioning Profiles (Xcode 4)</title><content type='html'>&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Joining the iOS Developer Program&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Being a member of the iOS Developer Program should not be confused with being a registered Apple developer. Being a registered Apple developer only gives you the ability to download the iOS SDK and access to additional developer related information. Membership of the iOS Developer Program, however, allows you to set up certificates and provisioning profiles to test apps on physical devices and, ultimately, submit completed apps for possible acceptance into the Apple App Store.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Enrollment into this program currently costs $99 per year. It is also possible that your employer already has membership, in which case contact the program administrator in your company and ask them to send you an invitation to join. Once they have done this Apple will send you an email entitled &quot;You Have Been Invited to Join an Apple Developer Program&quot; containing a link to activate your membership. If you or your company is not already a program member, you can enroll online at:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;a class=&quot;external free&quot; href=&quot;http://developer.apple.com/programs/ios/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.techotopia.com/skins/monobook/external.png); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #3366bb; padding-right: 13px; text-decoration: none;&quot; title=&quot;http://developer.apple.com/programs/ios/&quot;&gt;http://developer.apple.com/programs/ios/&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Having completed the enrollment process, navigate to&amp;nbsp;&lt;a class=&quot;external free&quot; href=&quot;http://developer.apple.com/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.techotopia.com/skins/monobook/external.png); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #3366bb; padding-right: 13px; text-decoration: none;&quot; title=&quot;http://developer.apple.com&quot;&gt;http://developer.apple.com&lt;/a&gt;&amp;nbsp;and click on the&amp;nbsp;&lt;i&gt;Member Center&lt;/i&gt;&amp;nbsp;link located near the top right hand corner of the screen. On the resulting page enter the Apple ID and password associated with your iOS Developer Program membership to access the member center home page as illustrated in the following figure:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:Ios_developer_member_center.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;The iOS Developer Member Center web page&quot;&gt;&lt;img alt=&quot;The iOS Developer Member Center web page&quot; height=&quot;639&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:Ios_developer_member_center.jpg&quot; src=&quot;http://www.techotopia.com/images/a/a5/Ios_developer_member_center.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;1011&quot; /&gt;&lt;/a&gt;]]&lt;br /&gt;
&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Having gained access to the iOS Developer Program the next step is to create and install a certificate on the Mac OS X system on which you are developing your iPhone apps.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Creating_an_iOS_Development_Certificate_Signing_Request&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Creating an iOS Development Certificate Signing Request&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Any apps that are to be installed on a physical iPhone device must first be signed using an iOS Development Certificate. In order to generate a certificate the first step is to generate a Certificate Signing Request (CSR). Begin this process by opening the Keychain Access tool on your Mac system. This tool can be found in the&amp;nbsp;&lt;i&gt;Applications -&amp;gt; Utilities folder&lt;/i&gt;. Once launched, the Keychain Access main window will appear as follows:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:KeychainPreferences.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;The Mac OS X Keychain Access Preferences window&quot;&gt;&lt;img alt=&quot;The Mac OS X Keychain Access Preferences window&quot; height=&quot;303&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:KeychainPreferences.png&quot; src=&quot;http://www.techotopia.com/images/b/b1/KeychainPreferences.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;625&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Within the Keychain Access utility, perform the following steps:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;1. Select the Keychain Access -&amp;gt; Preferences menu and select Certificates in the resulting dialog:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;2. Within the Preferences dialog make sure that the online Certificate Status Protocol (OCPS) and Certificate Revocation List (CRL) settings are both set to Off, then close the dialog.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;3. Select the&amp;nbsp;&lt;i&gt;Keychain Access -&amp;gt; Certificate Assistant -&amp;gt; Request a Certificate from a Certificate Authority…&lt;/i&gt;&amp;nbsp;menu option and enter your email and name exactly as registered with the iOS Developer Program. Leave the CA Email Address field blank and select the&amp;nbsp;&lt;i&gt;Saved to Disk&lt;/i&gt;&amp;nbsp;and&amp;nbsp;&lt;i&gt;Let me specify key pair information&lt;/i&gt;&amp;nbsp;options:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:KeychainCertificateAssistant.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;The Keychain Access Certificate Assistant&quot;&gt;&lt;img alt=&quot;The Keychain Access Certificate Assistant&quot; height=&quot;436&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:KeychainCertificateAssistant.png&quot; src=&quot;http://www.techotopia.com/images/b/ba/KeychainCertificateAssistant.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;616&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
4. Clicking the Continue button will prompt for a file and location into which the CSR is to be saved. Either accept the default settings, or enter alternative information as desired at which point the Key Pair Information screen will appear as illustrated in the following figure:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;float: right; font-family: sans-serif; font-size: 13px; line-height: 19px; margin-left: 20px;&quot;&gt;&lt;div id=&quot;bookcover_sky&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(128, 128, 128); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(128, 128, 128); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(128, 128, 128); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(128, 128, 128); border-top-style: solid; border-top-width: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 3px; margin-top: 0px; opacity: 100; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: center;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;a class=&quot;booklink&quot; href=&quot;http://www.ebookfrenzy.com/ebookpages/iphone_ios_5_ebook.html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: white; font-size: 12px; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img id=&quot;coverthumb&quot; src=&quot;http://www.techotopia.com/cover_images/iphone_ios_5_cover_100x74.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://www.ebookfrenzy.com/ebookpages/iphone_ios_5_ebook.html&quot; id=&quot;booktitle&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; font-size: 1.1em; text-decoration: none;&quot;&gt;iPhone iOS 5&lt;br /&gt;
Development&lt;br /&gt;
Essentials eBook&lt;/a&gt;&lt;div id=&quot;bookprice&quot; style=&quot;color: red; font-size: 1.1em;&quot;&gt;$12.99&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;a class=&quot;booklink&quot; href=&quot;http://www.ebookfrenzy.com/ebookpages/iphone_ios_5_ebook.html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: white; font-size: 12px; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img id=&quot;bookbutton&quot; src=&quot;http://www.techotopia.com/cover_images/BuyeBook.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://www.ebookfrenzy.com/&quot; id=&quot;bookcaption&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; font-size: 0.8em; text-decoration: none;&quot;&gt;eBookFrenzy.com&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:KeychainPairInformation.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;Configuring iOS Developer Certificate Key Pair Information&quot;&gt;&lt;img alt=&quot;Configuring iOS Developer Certificate Key Pair Information&quot; height=&quot;436&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:KeychainPairInformation.png&quot; src=&quot;http://www.techotopia.com/images/4/49/KeychainPairInformation.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;616&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
5. Verify that the 2048 bits key size and RSA algorithm are selected before clicking on the Continue button. The certificate request will be created in the file previously specified and the Conclusion screen displayed. Click Done to dismiss the Certificate Assistant window.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Submitting_the_iOS_Development_Certificate_Signing_Request&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Submitting the iOS Development Certificate Signing Request&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Having created the Certificate Signing Request (CSR) the next step is to submit it for approval. This is performed within the iOS Provisioning Portal which is accessed from the Member Center of the Apple developer web site. Under Developer Program Resources on the main member center home page select iOS Provisioning Portal. Within the portal, select the Certificates link located in the left hand panel to display the following page:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:IPhonePortalCertificate.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;The iOS Provisioning Portal Certificates Page&quot;&gt;&lt;img alt=&quot;The iOS Provisioning Portal Certificates Page&quot; height=&quot;640&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:IPhonePortalCertificate.png&quot; src=&quot;http://www.techotopia.com/images/0/02/IPhonePortalCertificate.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;985&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Click on the&amp;nbsp;&lt;i&gt;Request a Certificate&lt;/i&gt;&amp;nbsp;button, scroll down to the bottom of the text under the heading Create an iOS Development Certificate and click on the&amp;nbsp;&lt;i&gt;Choose File&lt;/i&gt;&amp;nbsp;button. In the resulting file selection panel, navigate to the certificate signing request file created in the previous section and click on Choose. Once your file selection is displayed next to the&lt;i&gt;Choose File&lt;/i&gt;&amp;nbsp;button, click on the&amp;nbsp;&lt;i&gt;Submit&lt;/i&gt;&amp;nbsp;button located in the bottom right hand corner of the web page. At this point you will be returned to the main Certificates page where your certificate will be listed as Pending Approval:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:IPhoneCertificatePendingApproval.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;A certificate pending approval in the iOS Provisioning Portal&quot;&gt;&lt;img alt=&quot;A certificate pending approval in the iOS Provisioning Portal&quot; height=&quot;743&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:IPhoneCertificatePendingApproval.png&quot; src=&quot;http://www.techotopia.com/images/2/22/IPhoneCertificatePendingApproval.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;984&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
If you are not the Team Administrator, you will need to wait until that person approves your request. If, on the other hand, you are the administrator for the iOS Developer Program membership you may approve your own certificate request by clicking on the Approve button located in the Action column of the Your Certificate table. Your certificate is now active and the table will refresh to include a button to Download the certificate.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Installing_an_iOS_Development_Certificate&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Installing an iOS Development Certificate&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Once a certificate has been requested and approved it must be installed on the development system so that Xcode can access it and use it to sign any applications you develop. The first step in this process is to download the certificate from the iOS Provisioning Portal by clicking on the Download button located on the certificates page outlined in the previous section. Once the file has downloaded, double click on it to load it into the Keychain Access tool. The certificate will then be listed together with a status (hopefully one that reads This certificate is valid):&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:IPhoneCertificateInstalled.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;An iOS developer certificate installed in the Keychain&quot;&gt;&lt;img alt=&quot;An iOS developer certificate installed in the Keychain&quot; height=&quot;381&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:IPhoneCertificateInstalled.png&quot; src=&quot;http://www.techotopia.com/images/3/35/IPhoneCertificateInstalled.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;753&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Your certificate is now installed into your Keychain and you are ready to move on to the next step.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Assigning_Devices&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Assigning Devices&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Once you have a development certificate installed, the next step is to specify which devices are to be used to test the iOS apps you are developing. This is achieved by entering the Unique Device identifier (UDID) for each device into the Provisioning Portal. Note that Apple restricts developers to 100 devices per year.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;A new device may be added to the list of supported test devices either from within the Xcode Organizer window, or by logging into the iOS Developer Portal and manually adding the device. To add a device to the portal from within Organizer, simply connect the device, open the Organizer window in Xcode using the Organizer toolbar button, select the attached device from the left hand panel and click on the Add to Portal button. The Organizer will prompt for the developer portal login and password and then connect and enable the device for testing.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Manually adding a device, on the other hand, requires the use of the iPhone’s UDID. This may be obtained either via Xcode or iTunes. Begin by connecting the device to your computer using the docking connector. Once Xcode has launched the Organizer screen will appear displaying summary information about the device (or may be opened by selecting Organizer button in the Xcode toolbar). The UDID is listed next to the Identifier label as illustrated in the following figure:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:Xcode_4_organizer_use_for_development.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;Obtaining an iPhone UDID from within the Xcode 4 Organizer&quot;&gt;&lt;img alt=&quot;Obtaining an iPhone UDID from within the Xcode 4 Organizer&quot; height=&quot;678&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:Xcode_4_organizer_use_for_development.jpg&quot; src=&quot;http://www.techotopia.com/images/c/cc/Xcode_4_organizer_use_for_development.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;850&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Alternatively, launch iTunes, select the device in the left hand pane and review the Summary information page. One of the fields on this page will be labeled as Serial Number. Click with the mouse on this number and it will change to display the UDID.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Having identified the UDIDs of any devices you plan to use for app testing, select the Devices link located in the left hand panel of the iOS Provisioning Portal, and click on Add Devices in the resulting page. On the Add Devices page enter a descriptive name for the device and the 40 character UDID:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:IPhonePortalAddDevices.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;Adding devices in the iOS Provisioning Portal&quot;&gt;&lt;img alt=&quot;Adding devices in the iOS Provisioning Portal&quot; height=&quot;271&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:IPhonePortalAddDevices.png&quot; src=&quot;http://www.techotopia.com/images/1/11/IPhonePortalAddDevices.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;985&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
In order to add more than one device at a time simply click on the “+” button to create more input fields. Once you have finished adding devices click on the Submit button. The newly added devices will now appear on the main Devices page of the portal.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Creating_an_App_ID&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Creating an App ID&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;The next step in the process is to create an App ID for each app that you create. This ID allows your app to be uniquely identified within the Apple iOS application infrastructure. To create an App ID, select the App IDs link in the provisioning portal and click on the New App ID button to display the Create App ID screen as illustrated below:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:CreateAppId.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;Creating an iPhone iOS App ID&quot;&gt;&lt;img alt=&quot;Creating an iPhone iOS App ID&quot; height=&quot;601&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:CreateAppId.png&quot; src=&quot;http://www.techotopia.com/images/e/e2/CreateAppId.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;816&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Enter a suitably descriptive name into the Description field and then make a Bundle Seed ID selection. If you have not created any previous Seed IDs then leave the default Generate New selection unchanged. If you have created a previous App ID and would like to use this for your new app, click on the menu and select the desired ID from the drop down list. Finally enter the Bundle Identifier. This is typically set to the reversed domain name of your company followed by the name of the app. For example, if you are developing an app called MyApp, and the URL for your company is www.mycompany.com then your Bundle identifier would be entered as:&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;pre style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;com.mycompany.MyApp 
&lt;/pre&gt;&lt;/span&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;If you would like to create an App ID that can be used for multiple apps then the wildcard character (*) can be substituted for the app name. For example:&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;pre style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;&quot;&gt;com.mycompany.*
&lt;/pre&gt;&lt;/span&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Having entered the required information, click on the&amp;nbsp;&lt;i&gt;Submit&lt;/i&gt;&amp;nbsp;button to return to the main App ID page where the new ID will be listed.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Creating_an_iOS_Development_Provisioning_Profile&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Creating an iOS Development Provisioning Profile&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;The Provisioning Profile is where much of what we have created so far in the chapter is pulled together. The provisioning profile defines which developer certificates are allowed to install an app on a device, which devices can be used and which apps can be installed. Once created, the provisioning profile must be installed on each device on which the designated app is to be installed. To create a provisioning profile, select the&amp;nbsp;&lt;i&gt;Provisioning&lt;/i&gt;&amp;nbsp;link in the Provisioning Portal and click on the&amp;nbsp;&lt;i&gt;New profile&lt;/i&gt;&amp;nbsp;button. In the resulting Create iPhone Provisioning Profile screen, perform the following tasks:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;1. In the Profile Name field enter a suitably descriptive name for profile you are creating.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;2. Set the check box next to each certificate to specify which developers are permitted to use this particular profile.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;3. Select an App ID from the menu.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;4. Select the devices onto which the app is permitted to be installed.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;5. Click on the Submit button.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Now that the provisioning profile has been created, the next step is to download and install it. To do so, click on the Download button next to your new profile and save it to your local system (note that the file will have a .mobileprovision file name extension). Once saved, either drag and drop the file to the Xcode icon in the dock or into the Xcode Organizer window, which may be accessed using the Xcode Organizer toolbar button. Once the provisioning profile is installed, it should appear in the Organizer window as follows:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:Xcode_provisioning_installed.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;The Xcode Organizer with an installed provisioning profile&quot;&gt;&lt;img alt=&quot;The Xcode Organizer with an installed provisioning profile&quot; height=&quot;678&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:Xcode_provisioning_installed.jpg&quot; src=&quot;http://www.techotopia.com/images/b/b7/Xcode_provisioning_installed.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;850&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Enabling_an_iPhone_Device_for_Development&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Enabling an iPhone Device for Development&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;With the provisioning profile installed select the target device in the left hand panel of Organizer window and click on the Use for Development button. The Organizer will then prompt you for your Apple developer login and password:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:Xcode_4_organizer_portal_login.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;Enabling an iPhone for development in Xcode 4&quot;&gt;&lt;img alt=&quot;Enabling an iPhone for development in Xcode 4&quot; height=&quot;686&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:Xcode_4_organizer_portal_login.jpg&quot; src=&quot;http://www.techotopia.com/images/f/f4/Xcode_4_organizer_portal_login.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;858&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
Once a valid login and password have been entered, the Organizer will perform the steps necessary to install the provisioning profile on the device and enable it for application testing.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Associating_an_App_ID_with_an_App&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Associating an App ID with an App&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Before we can install our own app directly onto a device, we must first embed the App ID created in the iOS Provisioning Portal and referenced in the provisioning profile into the app itself. To achieve this:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;1. In the left hand panel of the main Xcode window, select the project navigator toolbar button and select the top item (the application name) from the resulting list.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;2. Select the Info tab from in the center panel:&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.techotopia.com/index.php/Image:Xcode_4_bundle_identifier.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot; title=&quot;Configuring the bundle identifier for an iPhone app in Xcode 4&quot;&gt;&lt;img alt=&quot;Configuring the bundle identifier for an iPhone app in Xcode 4&quot; height=&quot;585&quot; longdesc=&quot;http://www.techotopia.com/index.php/Image:Xcode_4_bundle_identifier.jpg&quot; src=&quot;http://www.techotopia.com/images/5/51/Xcode_4_bundle_identifier.jpg&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: middle;&quot; width=&quot;958&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;&lt;br /&gt;
In the Bundle Identifier field enter the App ID you created in the iOS Provisioning Portal. This can either be in the form of your reverse URL and app name (for example com.mycompany.HelloWorld) or you can have the product name substituted for you by entering com.mycompany.${PRODUCT_NAME:rfc1034indentifer} as illustrated in the previous figure.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Once the App ID has been configured the next step is to build the application and install it onto the iPhone or iPod Touch device.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;iOS_and_SDK_Version_Compatibility&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;iOS and SDK Version Compatibility&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;float: right; font-family: sans-serif; font-size: 13px; line-height: 19px; margin-left: 20px;&quot;&gt;&lt;div align=&quot;center&quot;&gt;&lt;iframe frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://www.techotopia.com/AdFiles/Burst_box.html&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Before attempting to install and run an application on a physical iPhone device it is important to be aware of issues relating to version compatibility between the SDK used for the development and the operating system running on the target device. For example, if the application was developed using version 4.3 of the iOS SDK then it is important that the iPhone on which the app is to be installed is running iOS version 4.3 or later. An attempt to run the app on an iPhone with an older version of iOS will result in an error reported by Xcode that reads “Xcode cannot run using the selected device. No Provisioned iOS devices are available. Connect an iOS device or choose an iOS simulator as the destination”.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;The absence in this message of any indication that the connected device simply has the wrong version of iOS installed on it may lead the developer to assume that a problem exists either with the connection or with the certification or provisioning profile. If you encounter this error message, therefore, it is worth checking version compatibility before investing what typically turns into many hours of effort trying to resolve non-existent connectivity and provisioning problems.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;a href=&quot;&quot; name=&quot;Installing_an_App_onto_a_Device&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #002bb8; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: #2963a6; font-family: sans-serif; font-size: 19px; font-weight: normal; line-height: 19px; margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;&quot;&gt;&lt;span class=&quot;mw-headline&quot;&gt;Installing an App onto a Device&lt;/span&gt;&lt;/h2&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;Located in the top left hand corner of the main Xcode window is drop down menu which, when clicked, provides a menu of options to control the target run environment for the current app.&lt;/div&gt;&lt;div style=&quot;font-family: sans-serif; font-size: 13px; line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;&quot;&gt;If either the iPhone or iPad Simulator option is selected then the app will run within the corresponding simulated environment when it is built. To instruct Xcode to install and run the app on device itself, simply change this menu to the iOS Device setting. Assuming the device is connected, click on the Run button and watch the status updates as Xcode compiles the source code. Once the code is built, Xcode will need to sign the app using your developer certificate. If prompted with a message that reads “codesign wants to sign using key “&amp;lt;key name&amp;gt;” in your keychain select either Allow or Always Allow (if you do not wish to be prompted during future builds). Once signing is complete the status will change to “Installing &amp;lt;appname&amp;gt;.app on iPhone…”. After a few seconds the app will be installed and will automatically start running on the device where it may be tested in a real world environment.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/5197934556793513424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/testing-ios-4-apps-on-iphone-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5197934556793513424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5197934556793513424'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/testing-ios-4-apps-on-iphone-developer.html' title='Testing iOS 4 Apps on the iPhone – Developer Certificates and Provisioning Profiles (Xcode 4)'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-2714210565033648359</id><published>2012-05-12T10:26:00.002+07:00</published><updated>2012-05-12T10:26:34.321+07:00</updated><title type='text'>Deploying Your App to Your Own iPhone / iPad / iPod</title><content type='html'>&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 10px;&quot;&gt;When I first learned how to write an iOS application, I found that the biggest challenge wasn&#39;t in learning Objective-C, nor was it in becoming familiar with the Xcode IDE.&amp;nbsp; Instead, the main difficulty was in getting my app on to my own device!&amp;nbsp; Unfortunately, many of the books and tutorials assume you&#39;ll figure this out on your own... and as I learned, the process was not trivial:&lt;/div&gt;&lt;ul style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 24px;&quot;&gt;&lt;li&gt;I had to create a public/private key pair&amp;nbsp;&lt;em&gt;(via &quot;Keychain&quot;)&lt;/em&gt;,&lt;/li&gt;
&lt;li&gt;Generate a certificate request&amp;nbsp;&lt;em&gt;(via &quot;Keychain&quot;)&lt;/em&gt;,&lt;/li&gt;
&lt;li&gt;Login to the Provisional Portal at the Apple Developer Site,&lt;/li&gt;
&lt;li&gt;Create and download a development certificate with the certificate request,&lt;/li&gt;
&lt;li&gt;Find &amp;amp; register the UDID of my device,&lt;/li&gt;
&lt;li&gt;Create an &quot;App ID&quot;,&lt;/li&gt;
&lt;li&gt;Create and download a provisional profile which links my developer certificate, UDID, and App ID together,&lt;/li&gt;
&lt;li&gt;Install the certificate &amp;amp; profile into Xcode...&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 10px;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;... all for the simple purpose of testing out my app on my iPhone!&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 10px;&quot;&gt;Well, thankfully, Apple has reduced this complexity with the release of Xcode 4.&amp;nbsp; Here are the steps you need to take, in order to deploy your apps to your own device (for the purpose of developing &amp;amp; testing only... Ad Hoc &amp;amp; iTunes App Store distribution is still a much more involved process):&lt;/div&gt;&lt;ol style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 24px;&quot;&gt;&lt;li&gt;Register as a Paid Apple Developer.&amp;nbsp; Only paid accounts can deploy to actual devices.&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;Open up Xcode 4&#39;s Organizer, and select &quot;Provisioning Profiles&quot; in the left side menu:&lt;br /&gt;
&lt;a href=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/left-top-menu_3.png&quot; style=&quot;color: #000f47; text-decoration: none;&quot;&gt;&lt;img alt=&quot;left-top-menu&quot; border=&quot;0&quot; height=&quot;105&quot; src=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/left-top-menu_thumb_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;left-top-menu&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;On the bottom of the right side, &#39;check&#39; the checkbox labeled &quot;Automatic Device Provisioning&quot;:&amp;nbsp;&lt;br /&gt;
&lt;a href=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/provisioningprofiles_3.png&quot; style=&quot;color: #000f47; text-decoration: none;&quot;&gt;&lt;img alt=&quot;provisioningprofiles&quot; border=&quot;0&quot; height=&quot;65&quot; src=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/provisioningprofiles_thumb_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;provisioningprofiles&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Plug your device into your computer.&amp;nbsp; Select your device in the left side menu, and click the &quot;Use for Development&quot; button:&amp;nbsp;&lt;br /&gt;
&lt;a href=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/setupfordev_3.png&quot; style=&quot;color: #000f47; text-decoration: none;&quot;&gt;&lt;img alt=&quot;setupfordev&quot; border=&quot;0&quot; height=&quot;119&quot; src=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/setupfordev_thumb_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;setupfordev&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;You will be prompted to log in to your Apple Developer account.&amp;nbsp; Enter your credentials here:&lt;br /&gt;
&lt;a href=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/login_3.png&quot; style=&quot;color: #000f47; text-decoration: none;&quot;&gt;&lt;img alt=&quot;login&quot; border=&quot;0&quot; height=&quot;95&quot; src=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/login_thumb_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;login&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Xcode will likely you tell you that it doesn&#39;t recognize the version of iOS.&amp;nbsp; Allow it to collect the necessary information when prompted:&amp;nbsp;&lt;br /&gt;
&lt;a href=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/unknownios_3.png&quot; style=&quot;color: #000f47; text-decoration: none;&quot;&gt;&lt;img alt=&quot;unknownios&quot; border=&quot;0&quot; height=&quot;105&quot; src=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/unknownios_thumb_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;unknownios&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;After this has finished, you&#39;re done!&amp;nbsp; You should now see your device listed in the top left list of &quot;Schemes&quot; in Xcode:&amp;nbsp;&lt;br /&gt;
&lt;a href=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/xcode_3.png&quot; style=&quot;color: #000f47; text-decoration: none;&quot;&gt;&lt;img alt=&quot;xcode&quot; border=&quot;0&quot; height=&quot;180&quot; src=&quot;http://www.intertech.com/PostingImages/dec94bc29be1_DACC/xcode_thumb_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;xcode&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 10px;&quot;&gt;That&#39;s it - no more dealing with keys, certificates, UDIDs, App IDs, etc (at least for testing on your own device).&amp;nbsp; Also, note that you shouldn&#39;t need to repeat these steps for the same device on the same computer.&amp;nbsp; Once your device has been configured, it should be available for all of your Xcode iOS projects!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/2714210565033648359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/deploying-your-app-to-your-own-iphone.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/2714210565033648359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/2714210565033648359'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/deploying-your-app-to-your-own-iphone.html' title='Deploying Your App to Your Own iPhone / iPad / iPod'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4904971192825137207</id><published>2012-05-05T01:27:00.003+07:00</published><updated>2012-05-05T01:27:37.535+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Learn Object-C"/><title type='text'>Learn Objective-C: Day 4</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Welcome to part four of this series on Objective-C. So far, we’ve looked a lot at theory and the principles and functionality of the language to get a good idea of how it works. Today, we will be making a simple class similar to the car example we looked at in previous parts of this series. Our class will take the details of a car, allowing us to get and set the values held. After today’s example you should be able to create your own classes in Xcode and toy around with them.&lt;br /&gt;
&lt;span id=&quot;more-2212&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;So far, we have had some great feedback via email, twitter and comments. Itʼs great to see so many people are interested in this subject and itʼs even better to see that so many of you are trying it out for yourself and asking some great questions. Keep it up!&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Getting Started&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Start by firing up Xcode and creating a new project. Under the Mac OS X separator, click Application, then click Command Line Tool. Finally, change the drop down box to set the type to Foundation.&lt;/div&gt;&lt;div class=&quot;tutorial_details&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #383838; float: left; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 20px; vertical-align: baseline; width: 680px;&quot;&gt;&lt;img alt=&quot;Xcode New Project&quot; src=&quot;http://d339vfjsz5zott.cloudfront.net/53_Learn-Objective-C-4/Learn-Objective-C_01.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Save the project as whatever you want, I called mine CarApp. Once the project window appears, we need to create a new class. Hit Command-N (or File &amp;gt; New File), navigate to Cocoa Class under Mac OS X and select Objective-C class. Make sure Subclass of is set to NSObject and press Next. Name your class SimpleCar and ensure that a .h file will be created, then save it.&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Our class now exists, but it does nothing. Let’s change that by giving it some code. Remember that in Objective-C we split our code into two parts: interface and implementation. It makes logical sense to work on the interface first, so that’s where we’ll start.&lt;/div&gt;&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #373737; font-family: Helvetica, Arial; font-size: 30px; font-style: inherit; font-weight: normal; letter-spacing: -0.02em; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 20px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Coding the Interface&lt;/h3&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Open up the SimpleCar.h file and in its current state it should look like this (I’ve omitted the comment header from below)&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&amp;lt;Cocoa/Cocoa.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@interface&amp;nbsp;SimpleCar&amp;nbsp;:&amp;nbsp;NSObject&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;First of all, we’re including Cocoa.h, which gives us access to such things as NSString, NSMutableString, etc. Then, we create our class (SimpleCar) as a subclass of NSObject.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Now we need to decide on what information our class needs to store. Since we’re using a car as our example we need to store car-related information, such as:&lt;/div&gt;&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Make&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Model&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;VIN&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;There’s a lot more we could go into, but for now that will do. For each of these properties, we need to store them in a variable suited for that type of data. Make and model will be a range of characters (such as text, number and possibly punctuation) so it makes sense to use a string. The VIN (Vehicle Identification Number) will only be a number so that’s what we’ll use. Our code now looks like this (header omitted):&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@interface&amp;nbsp;SimpleCar&amp;nbsp;:&amp;nbsp;NSObject&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString*&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString*&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSNumber*&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;We previously said that in order to get or set data from a class, a method should be used. So to set the variables, we need to add methods. To do this, we’ll make four: one will set the make, one the model, one the VIN, and a final method will set both make AND model (just to show you how to use multiple arguments).&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@interface&amp;nbsp;SimpleCar&amp;nbsp;:&amp;nbsp;NSObject&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString*&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString*&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSNumber*&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;set&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setVin:&amp;nbsp;&amp;nbsp;&amp;nbsp;(NSNumber*)newVin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;&amp;nbsp;(NSString*)newMake;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setModel:&amp;nbsp;(NSString*)setModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;convenience&amp;nbsp;method&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;We declare methods after the curly bracket and before @end. By placing a dash (minus sign) before the method, we tell the compiler we’re about to declare an instance method. An instance method is a method executed on our instance. Conversely, a plus sign indicates that the method being invoked is a class method that does not need an individual object instance to execute -more on this later.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Our first method returns void, is called setVin and takes an NSNumber as an argument. Our second method is similar, it returns void, is call setMake, and takes an NSString as an argument. The third is the same, with a different name.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Our final method also returns void but takes two parameters: newMake and newModel, both of which should be NSString. The naming used in this method is similar to how most Objective-C methods are named: in plain English. So when you read the method allowed it’s obvious that the method will “Set make and model.” It’s important to remember that the method name in this case is ‘setMake:andModel:’ – all the argument titles are included in the method name.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;An important note is that we use (void) because our methods do not need to return anything. Since all they are doing is setting data and do not need to return anything back (such as a success message) we simply use void.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Next, we will add the methods we will use to get the values. Although we call our methods get and set methods, we only usually use “set” in the title and omit “get.” How you name your methods is ultimately up to you, but dropping “get” is common and helps avoid confusion.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Our new set of methods looks like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;set&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setVin:&amp;nbsp;&amp;nbsp;&amp;nbsp;(NSNumber*)newVin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;&amp;nbsp;(NSString*)newMake;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setModel:&amp;nbsp;(NSString*)newModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;convenience&amp;nbsp;method&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;get&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSNumber*)&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Notice that the get methods use the same names as the variables in the class. This will make it simple when we fetch the variables. It will be as if we’re accessing the variables directly, essentially making the get methods appear transparent.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Coding the Implementation&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;So now that the interface is in place and we know what the class will do, we need to implement our methods. Looking back, we have four methods we need to implement: setVin, setMake, setModel and setMake:andModel. Before we move files, copy the method declarations to your clipboard (Cmd+C). Now close SimpleCar.h and fire up SimpleCar.m in the editor, pasting the method declarations in between the @implementation and @end, like so:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@implementation&amp;nbsp;SimpleCar&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;set&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setVin:&amp;nbsp;&amp;nbsp;&amp;nbsp;(NSNumber*)newVin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;&amp;nbsp;(NSString*)newMake;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setModel:&amp;nbsp;(NSString*)newModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;convenience&amp;nbsp;method&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;get&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSNumber*)&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Obviously this isn’t right, so what we need to do is swap the semi-colons for curly brackets where the inner workings of the method will go, like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@implementation&amp;nbsp;SimpleCar&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;set&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setVin:&amp;nbsp;(NSNumber*)newVin&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setModel:&amp;nbsp;(NSString*)newModel&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;get&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;make&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;model&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSNumber*)&amp;nbsp;vin&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Now we need to give our methods some code. Let’s start with the getter methods as they’re straightforward enough. For each getter method, all we need to do is make sure that the function returns what it is intended to return. For this reason, our getter methods look like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;make&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSString*)&amp;nbsp;model&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(NSNumber*)&amp;nbsp;vin&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Remember&lt;/strong&gt;: the methods are returning the variables we defined in the interface file. Don’t get confused between the method names and the variable names.&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 11px; font-style: italic; font-weight: inherit; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;ins style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline-table; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;ins id=&quot;aswift_0_anchor&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: block; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; id=&quot;aswift_0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; name=&quot;aswift_0&quot; scrolling=&quot;no&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; left: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; top: 0px; vertical-align: baseline;&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;That’s pretty straightforward, when we call make (for example), then make returns the pointer to an NSString – in this case to the make variable. The same happens for model and vin (except of course vin returns a number).&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Now for the setter methods, first we’ll look at the code and then we’ll go through it afterwards. Our setter methods look like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;set&amp;nbsp;methods&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setVin:&amp;nbsp;(NSNumber*)newVin&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[vin&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vin&amp;nbsp;=&amp;nbsp;[[NSNumber&amp;nbsp;alloc]&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vin&amp;nbsp;=&amp;nbsp;newVin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[make&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;make&amp;nbsp;=&amp;nbsp;[[NSString&amp;nbsp;alloc]&amp;nbsp;initWithString:newMake];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setModel:&amp;nbsp;(NSString*)newModel&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[model&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;model&amp;nbsp;=&amp;nbsp;[[NSString&amp;nbsp;alloc]&amp;nbsp;initWithString:newModel];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;convenience&amp;nbsp;method&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;Reuse&amp;nbsp;our&amp;nbsp;methods&amp;nbsp;from&amp;nbsp;earlier&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self&amp;nbsp;setMake:newMake];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self&amp;nbsp;setModel:newModel];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;The set methods are a bit trickier than our get methods. We want to alloc the values that are passed into each method so that they are owned by the class. We first release these variables in case they are already alloc’d. If they are not alloc’d, then they are nil, and nil objects ignore messages passed to them. We will cover these issues more when we discuss memory management.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Because we actually allocated memory for our objects in the setter methods, we need to be sure we release them when the object is released from memory. To do this, we need to add a custom dealloc method, like so:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-(&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;dealloc&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[vin&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[make&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[model&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[super&amp;nbsp;dealloc];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Testing the Class&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Congratulations! If you followed everything above then you should now have a working class (if not, download the source files available with this article). So, let’s test it out.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Open up the main file of your project (mine is called CarApp.m) which by default should look something like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&amp;lt;Foundation/Foundation.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;argc,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;*&amp;nbsp;argv[])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSAutoreleasePool&amp;nbsp;*&amp;nbsp;pool&amp;nbsp;=&amp;nbsp;[[NSAutoreleasePool&amp;nbsp;alloc]&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;Insert&amp;nbsp;custom&amp;nbsp;code&amp;nbsp;here...&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSLog(@&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Hello,&amp;nbsp;World!&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[pool&amp;nbsp;drain];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Delete the comment and NSLog line as we won’t be needing them right now.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;In order to begin using our class, we need to pull it into the program. Underneath the original #import line add the following line:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&quot;SimpleCar.h&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Our class is now available for use, but we need to create an instance of it in order to test it out. Here’s the code used in total:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&amp;lt;Foundation/Foundation.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&quot;SimpleCar.h&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;argc,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;*&amp;nbsp;argv[])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;NSAutoreleasePool&amp;nbsp;*&amp;nbsp;pool&amp;nbsp;=&amp;nbsp;[[NSAutoreleasePool&amp;nbsp;alloc]&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SimpleCar&amp;nbsp;*myCar&amp;nbsp;=&amp;nbsp;[[SimpleCar&amp;nbsp;alloc]&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSNumber&amp;nbsp;*newVin&amp;nbsp;=&amp;nbsp;[NSNumber&amp;nbsp;numberWithInt:123];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[myCar&amp;nbsp;setVin:newVin];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[myCar&amp;nbsp;setMake:@&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;andModel:@&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Civic&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSLog(@&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;The&amp;nbsp;car&amp;nbsp;is:&amp;nbsp;%@&amp;nbsp;%@&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;[myCar&amp;nbsp;make],&amp;nbsp;[myCar&amp;nbsp;model]);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSLog(@&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;The&amp;nbsp;vin&amp;nbsp;is:&amp;nbsp;%@&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;[myCar&amp;nbsp;vin]);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[myCar&amp;nbsp;release];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;[pool&amp;nbsp;drain];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;First of all we create a pointer to an instance of SimpleCar called myCar. Next we use alloc and init – these will be discussed later on down the line.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Next, since we need to pass an NSNumber to the setVin method, we make one here. Again we create a pointer to an NSNumber instance called newVin and we initiate it with the integer value of 123. The constant ’123′ is an integer, which is why we use numberWithInt.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Next, we invoke our methods, first of all we put who should receive the message (myCar) and then we use the method setVin. After the colon is the value we are supplying to the method which is the NSNumber we created before. Next we do the same but call the setMake method with two parameters. The reason these parameters are preceded by an @ sign is to tell the compiler that the following is a string.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Finally, we release myCar as we are done with it – more on this later in the series under memory management.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Our class is now working, and in order to see the proof, we added some NSLog statements to print the values to the console. If you open up the console (Run &amp;gt; Console) and then build and run your app, you should see output similar to this:&lt;/div&gt;&lt;div class=&quot;tutorial_details&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #383838; float: left; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 20px; vertical-align: baseline; width: 680px;&quot;&gt;&lt;img alt=&quot;Debugger&quot; src=&quot;http://d339vfjsz5zott.cloudfront.net/53_Learn-Objective-C-4/Learn-Objective-C_02.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Property and Synthesize&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;If you look at the code above, a lot of it seems quite pointless and excessive. For example, in our getter methods all we are doing is returning an instance variable – but this takes up three lines of code to do something simple. Also, in our setter methods, we are just setting instance variables – essentially all of our methods, except our method that takes two arguments, seem bloated and in the way. Objective-C solves this with @property and @synthesize, which replace our accessor methods and make for much neater coding.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This is what our new interface file looks like using properties:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&amp;lt;cocoa&amp;nbsp;cocoa.h=&quot;&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@interface&amp;nbsp;SimpleCar&amp;nbsp;:&amp;nbsp;NSObject&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString*&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString*&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSNumber*&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@property(readwrite,&amp;nbsp;retain)&amp;nbsp;NSString*&amp;nbsp;make;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@property(readwrite,&amp;nbsp;retain)&amp;nbsp;NSString*&amp;nbsp;model;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@property(readwrite,&amp;nbsp;retain)&amp;nbsp;NSNumber*&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;convenience&amp;nbsp;method&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/cocoa&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Wow, that really is a lot shorter. So what’s happening with the @property declarations? First we tell the compiler we are declaring a property by using @property, then we follow with attributes for this property. The attributes are the read/write status of a property and some memory management. We have used readwrite for all, which means getter and setter methods are dynamically created for our instance variables (we could of used writeonly or readonly for just one or the other). The reason we use retain will become clear next time when we cover memory management.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Before this can work, we need to implement it in our implementation file, we do this using @synthesize. Our new implementation file looks like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-4/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&quot;SimpleCar.h&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@implementation&amp;nbsp;SimpleCar&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@synthesize&amp;nbsp;make,&amp;nbsp;model,&amp;nbsp;vin;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;setMake:&amp;nbsp;(NSString*)newMake&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;andModel:&amp;nbsp;(NSString*)newModel&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self&amp;nbsp;setMake:newMake];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[self&amp;nbsp;setModel:newModel];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Doesn’t that look better? Think of it like this, @property replaces all of the interface method declarations for getters and setters, and @synthesize replaces the actual methods themselves. The getters and setters are now dynamically created and we don’t need to waste time creating them unless we need to do something really special.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Wrapping Up&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;You should now have a firm grip of classes, objects and instances. Sure, you’re not creating classes that will change the world yet, but this stuff takes time. It’s better to learn by example, so if you’re not coding as you go along then be sure to at least download the source files and have a read through (and a compile) to ensure you’re 100% on what’s going on.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Next Time&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;We’ve mentioned memory management a lot in this tutorial, it’s a very important subject that needs to be addressed (pun intended), so we’ll dive in to that next time. True, it isn’t the most fun subject or the easiest to come to terms with, but it’s absolutely crucial if you want to become a skilled Objective-C programmer.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Challenge&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This week’s challenge may be a little tricky, but we’ll see how you get on. First of all, if you haven’t copied all the code above, download the source files that are included with this article. The challenge is to add another class to the project, but this time it should be a subclass of SimpleCar (remember, we define the parent class in the interface file). If you can do that, play around and use the inherited methods and try to add your own for things such as: engine size, doors or height.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Remember&lt;/strong&gt;: if you have any questions or queries, drop a comment below or shoot me a message on Twitter. The only stupid question is the one you didn’t ask – this series is about learning so feel free to ask away!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4904971192825137207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/learn-objective-c-day-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4904971192825137207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4904971192825137207'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/learn-objective-c-day-4.html' title='Learn Objective-C: Day 4'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-3418824154788160305</id><published>2012-05-04T10:04:00.000+07:00</published><updated>2012-05-04T10:04:14.372+07:00</updated><title type='text'>Installing Tomcat on Mac OS X</title><content type='html'>&lt;div style=&quot;color: #333333; font-family: Verdana, &#39;Trebuchet MS&#39;, arial, sans-serif; font-size: 11px; line-height: 16px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;To get Tomcat, visit the following link:&amp;nbsp;&lt;a href=&quot;http://tomcat.apache.org/&quot; style=&quot;background: inherit; background: inherit; color: #339900; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;http://tomcat.apache.org/&lt;/a&gt;. Once there, click on the Tomcat 5.5 link under the Download heading. Under Core, select the tar.gz file.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Verdana, &#39;Trebuchet MS&#39;, arial, sans-serif; font-size: 11px; line-height: 16px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Download the tar.gz file. Mac OS X will probably extract the file to a .tar file in your downloads directory. Move this .tar file to a location on your computer where you would like tomcat. For purposes of this guide, the location will be /Users/user. Double-click the tar to extract it. This should create a directory in /Users/user named something like apache-tomcat . . . Rename this to something simple like tomcat. At this point, you should have the following directory on your machine:&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;/Users/user/tomcat&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;There is a file called startup.sh located in the the /Users/user/tomcat/bin directory that needs edited. Open EditRocket and open startup.sh Add the following two lines after the line in startup.sh that starts with EXECUATBLE. Note that for Snow Leopard, you can use 1.6 instead of 1.5 after the Versions text in the first line listed below.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home&lt;/b&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;export CATALINA_HOME=/Users/user/tomcat&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Verdana, &#39;Trebuchet MS&#39;, arial, sans-serif; font-size: 11px; line-height: 16px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;To start Tomcat, open up a Terminal window (Applications -&amp;gt; Utilities -&amp;gt; Terminal). cd to the tomcat bin directory by typing the following:&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;cd /Users/user/tomcat/bin&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Type the following:&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;sh startup.sh&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;This will start Tomcat. To shutdown tomcat, type sh shutdown.sh&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Verdana, &#39;Trebuchet MS&#39;, arial, sans-serif; font-size: 11px; line-height: 16px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;To test the tomcat installation, enter the following in your web browser:&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;http://localhost:8080/&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;If the apache tomcat page shows up, the installation was successful.&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Verdana, &#39;Trebuchet MS&#39;, arial, sans-serif; font-size: 11px; line-height: 16px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;There is a sample web application called jsp-examples located in the webapps directory under the tomcat installation directory. This location can be used to test your own JSP pages, or you can use the files contained in this directory as a template for creating your own web application.&amp;nbsp;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;The jsp-examples can be accessed in your web browser using the following URL: http://localhost:8080/jsp-examples/&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/3418824154788160305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/installing-tomcat-on-mac-os-x.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3418824154788160305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3418824154788160305'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/installing-tomcat-on-mac-os-x.html' title='Installing Tomcat on Mac OS X'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-2225002833298083515</id><published>2012-05-03T00:26:00.000+07:00</published><updated>2012-05-03T00:26:02.269+07:00</updated><title type='text'>&quot;EGO&quot; Xcode Theme for Xcode 4 + EGOv2</title><content type='html'>&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Almost&amp;nbsp;&lt;a href=&quot;http://developers.enormego.com/view/xcode_ego_theme&quot; style=&quot;color: #83a557; font-weight: bold; text-decoration: none;&quot;&gt;two years ago&lt;/a&gt;&amp;nbsp;now, we posted our Xcode theme, &quot;EGO&quot;. &amp;nbsp;It&#39;s been significantly more popular than I ever thought, we&#39;ve seen a lot tweets about, we&#39;ve seen it in screen casts, and it even&amp;nbsp;&lt;a href=&quot;http://www.robocatapps.com/blog/video-launching-outside/&quot; style=&quot;color: #83a557; font-weight: bold; text-decoration: none;&quot;&gt;made an appearance&lt;/a&gt;&amp;nbsp;in the product launch video for robotcat&#39;s Outside app. &amp;nbsp;There&#39;s no real metric for these things, but it seems to be one of the more popular third party Xcode things (we&#39;re number one in Google!).&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;So, with the GM release of Xcode 4&lt;em style=&quot;font-style: normal; font-weight: normal;&quot;&gt;,&lt;/em&gt;&amp;nbsp;we&#39;ve gone ahead and ported our original EGO theme to the new Xcode 4 file format.&lt;br /&gt;
&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;We&#39;re also posting a alternative version of EGO, EGOv2. &amp;nbsp;It&#39;s based on EGO but has some key differences: New background color, new comment colors, themed console, and other minor tweaks and slight HSB adjustments. &amp;nbsp;Here&#39;s a comparison:&lt;/div&gt;&lt;table border=&quot;0&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; border-collapse: collapse; color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; width: 638px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; width: 319px;&quot;&gt;&lt;a href=&quot;http://shn.to/3A092r3P3b1H170w2w3k&quot; style=&quot;color: #83a557; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://cl.ly/3A092r3P3b1H170w2w3k/Screen_shot_2011-02-04_at_12.36.37_PM.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;280&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Original EGO Theme&lt;/b&gt;&lt;/td&gt;&lt;td style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; width: 319px;&quot;&gt;&lt;a href=&quot;http://shn.to/302O3x1e3U262F2N2Y1e&quot; style=&quot;color: #83a557; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://cl.ly/302O3x1e3U262F2N2Y1e/Screen_shot_2011-02-04_at_12.36.06_PM.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;280&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;New EGOv2 Theme&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;To install the themes, run the following blocks of code in Terminal:&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;Original EGO&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;code style=&quot;border-bottom-color: rgb(226, 226, 226); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(226, 226, 226); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(226, 226, 226); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(226, 226, 226); border-top-style: solid; border-top-width: 1px; display: block; font-family: &#39;Panic Sans&#39;, Monaco, &#39;Courier New&#39;, Courier, monospace; font-size: 9pt; font-style: normal; font-weight: normal; line-height: 1.3em; margin-bottom: 5px; margin-left: 5px; margin-right: 5px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes; cd ~/Library/Developer/Xcode/UserData/FontAndColorThemes; curl -O http://developers.enormego.com/assets/egotheme/EGO.dvtcolortheme&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;b&gt;New EGOv2&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;code style=&quot;border-bottom-color: rgb(226, 226, 226); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(226, 226, 226); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(226, 226, 226); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(226, 226, 226); border-top-style: solid; border-top-width: 1px; display: block; font-family: &#39;Panic Sans&#39;, Monaco, &#39;Courier New&#39;, Courier, monospace; font-size: 9pt; font-style: normal; font-weight: normal; line-height: 1.3em; margin-bottom: 5px; margin-left: 5px; margin-right: 5px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes; cd ~/Library/Developer/Xcode/UserData/FontAndColorThemes; curl -O http://developers.enormego.com/assets/egotheme/EGOv2.dvtcolortheme&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Now just restart Xcode, go to Preferences &amp;gt; Fonts &amp;amp; Colors, and select &quot;EGO&quot; or &quot;EGOv2&quot; from the color theme drop down.&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;i&gt;Note: Both themes now use Menlo Bold 13pt. &amp;nbsp;This might not be for everyone, but I&#39;ve found it much easier on the eyes and the bold seems to render nicer than regular, to me. &amp;nbsp;Feel free to change!&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;color: #242424; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;i&gt;from:&amp;nbsp;http://developers.enormego.com/view/ego_xcode_theme_for_xcode_4_egov2&lt;/i&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/2225002833298083515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/ego-xcode-theme-for-xcode-4-egov2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/2225002833298083515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/2225002833298083515'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/ego-xcode-theme-for-xcode-4-egov2.html' title='&quot;EGO&quot; Xcode Theme for Xcode 4 + EGOv2'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-6365412289207297253</id><published>2012-05-02T23:31:00.000+07:00</published><updated>2012-05-02T23:31:03.683+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Learn Object-C"/><title type='text'>Learn Objective-C: Day 3</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Welcome to part three of this series -I hope youʼre enjoying it! Last week we looked at how we separate classes in to separate files (interface and implementation), this week weʼre going to look at classes again, but a little bit more in depth. Weʼll also take a peak at inheritance and how it works, along with variable scope.&lt;br /&gt;
&lt;span id=&quot;more-2094&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;So far, we have had some great feedback via email, twitter and comments. Itʼs great to see so many people are interested in this subject and itʼs even better to see that so many of you are trying it out for yourself and asking some great questions. Keep it up!&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;In Review: Classes &amp;amp; Objects&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Letʼs review what we have learned about classes in this series so far. If you donʼt know any of this, feel free to skim back to the last tutorial to re-cap. Ok, so, what are classes?&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;A class is a collection of encapsulated data and custom methods. A class may hold many different kinds of data, and the class methods usually (but not always) perform action related to that data. In Objective-C, a class is usually composed of two files: an interface file and an implementation file. The interface file uses the .h file extension by convention and is where the person using the class can quickly find the methods and data members available to the class. The implementation file uses the .m file extension by convention and is where the majority of the code resides because it contains the actual implementation of all the functions declared in the interface.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;So, what makes a class different from an object? What is an object? An object is an instance of a class. Think back to our example with the car in the last part of the series. Where&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;car&lt;/strong&gt;&amp;nbsp;is the class, then&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;myCar&lt;/strong&gt;,&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;dansCar&lt;/strong&gt;, and&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;yourCar&lt;/strong&gt;&amp;nbsp;would all be objects because they are instances of the car class.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Classes from Apple (and some history)&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Before we carry on, Iʼd like to share a few (of many) common classes youʼll be using a lot that are provided by Apple, but first a quick history lesson.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Many classes Apple provides are prepended by the abbreviation “NS”, which stands for NextStep. When Steve Jobs left Apple, he founded NeXT, creating workstation computers that ran on its operating system. The object orientated programming language used on those machines was called NeXTSTEP, which is where we get the “NS” from. When Apple ʻacquiredʼ (another history lesson in itself) NeXTSTEP, they decided to base Mac OS X on NeXTSTEP.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Here are some simple, common classes weʼll see a lot of:&lt;/div&gt;&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSString&lt;/strong&gt;&amp;nbsp;is a string of text that is immutable.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSMutableString&lt;/strong&gt;&amp;nbsp;is a string of text that is mutable.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSArray&lt;/strong&gt;&amp;nbsp;is an array of objects that is immutable.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSMutableArray&lt;/strong&gt;&amp;nbsp;is an array of objects that is mutable.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSNumber&lt;/strong&gt;&amp;nbsp;holds a numeric value.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Weʼll learn many more later on, but for now the above will come in handy. Youʼre probably wondering what mutable and immutable means, which is an entirely reasonable question. If an object is&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;immutable&lt;/strong&gt;&amp;nbsp;that means when we create the object and assign a value then it is static. The value can not be changed. If an object is&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;mutable&lt;/strong&gt;&amp;nbsp;then it is dynamic, meaning the value can be changed after creation.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Pointers and Initializing&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Letʼs say we want to make a static string of text and log it, how would we go about it? In our code it would look something like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&amp;lt;Foundation/Foundation.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;argc,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;*&amp;nbsp;argv[])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSString&amp;nbsp;*testString;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;testString&amp;nbsp;=&amp;nbsp;[[NSString&amp;nbsp;alloc]&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;testString&amp;nbsp;=&amp;nbsp;@&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Here&#39;s&amp;nbsp;a&amp;nbsp;test&amp;nbsp;string&amp;nbsp;in&amp;nbsp;testString!&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NSLog(@&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;testString:&amp;nbsp;%@&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;testString);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;I created this file in XCode by going to&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;File &amp;gt; New Project &amp;gt; Mac OS X &amp;gt; Application &amp;gt; Command Line Tool &amp;gt; Type: Foundation&lt;/strong&gt;&amp;nbsp;(quite a journey!) and editing the implementation (extension: .m) file in the project.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;There are quite a few things here that are new, so letʼs examine the above piece by piece.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;First of all, we import the foundation library (this is because we set type to Foundation in the new project window before).&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;argc,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;*&amp;nbsp;argv[])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This declares the initial function that will be called when our program begins execution. The two parameters separated by a comma are for passing arguments to our application. For now, donʼt worry about these as we wonʼt be needing them right now.&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 11px; font-style: italic; font-weight: inherit; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;ins style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline-table; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;ins id=&quot;aswift_0_anchor&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: block; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; id=&quot;aswift_0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; name=&quot;aswift_0&quot; scrolling=&quot;no&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; left: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; top: 0px; vertical-align: baseline;&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSString&amp;nbsp;*testString;&amp;nbsp;testString&amp;nbsp;=&amp;nbsp;[[NSString&amp;nbsp;alloc]&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;We now create a pointer to an NSString object called testString. Once the first line of this is finished, no string exists yet, only a pointer to a string that we have not yet created. On the next line, we create the string our pointer points to.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;We could have alternatively written the last line like this;&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;testString&amp;nbsp;=&amp;nbsp;[NSString&amp;nbsp;alloc];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;[testString&amp;nbsp;init];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This may seem a little confusing at first. In the first version, we have nested the statements within brackets on the same line, whereas in the second we have separated the statements into two lines. The method init initializes all the instance variables in the class.&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-3/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;testString&amp;nbsp;=&amp;nbsp;@&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Here&#39;s&amp;nbsp;a&amp;nbsp;test&amp;nbsp;string&amp;nbsp;in&amp;nbsp;testString!&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This line is pretty self explanatory, the reason we prepend the quotes with an @ sign is to tell the compiler that the following text is an NSString.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NSLog(@”testString: %@”, testString);&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Here we log some information to console. XCode has a debugger built in that you can find under the Run menu. It is very useful when developing an application to log when events are happening and the values of certain variables – it can help when troubleshooting your application and debugging problems. This method works like printf (remember from the first week?) where we supply a string of text with a replacement character (%@ means an Objective-C object).&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 11px; font-style: italic; font-weight: inherit; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;Learn Objective-C&quot; original=&quot;http://d339vfjsz5zott.cloudfront.net/45_Learn-Objective-C-3/1.png&quot; src=&quot;http://d339vfjsz5zott.cloudfront.net/45_Learn-Objective-C-3/1.png&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Finally we return 0, which we know just tells the operating system that the application ended with no problems.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Inheritance&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Remember when we made our NSString earlier, we used the init method? Well NSMutableString, NSArray and in fact, every single NS class, also uses init. Seems a lot of wasted code to put the init method in each class, right? It would be, thatʼs why init is usually only implemented once, in the root class known as NSObject. Because classes inherit from each other, a class that is created as a child of another, parent class will automatically gain access to the parent class methods.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Letʼs take NSMutableString for example. NSMutableString has NSString for a parent (making it a child), meaning it inherits from NSString. Meanwhile. NSString has NSObject as a parent, so it inherits from NSObject.&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 11px; font-style: italic; font-weight: inherit; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;Learn Objective-C&quot; original=&quot;http://d339vfjsz5zott.cloudfront.net/45_Learn-Objective-C-3/2.png&quot; src=&quot;http://d339vfjsz5zott.cloudfront.net/45_Learn-Objective-C-3/2.png&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;So for example, NSObject has a method called init, so each subclass has this method implemented – which is called a class method. As a matter of fact, the init method in NSObject doesn’t actually do anything it simply returns self. The reason for this is that methods can be overwritten. So the NSArray class may override the init that it inherits to add functionality to it – such as making sure memory is available or preparing any instance variables it may need.&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;As demonstrated, this is useful because it means that in addition to inheriting from classes we can also extend classes. When we extend a class, we take an existing class and add additional functionality to what is already available. This means you could create your own version of NSString with additional methods, such as a method to fill the string with random text or perform some sort of character encoding.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Summary&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;At this point, the fundamentals of how classes work should be clear. To test your comprehension, see if you can answer the following questions in your mind:&lt;/div&gt;&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;What is the difference between a class and an object?&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Why do we use classes?&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Why is inheritance useful?&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Since classes are such an important part of Objective-C, itʼs important to really feel comfortable working with them. Last week we started looking at classes and this week we have gone into more depth. Next week, you may be glad to hear, weʼre going to move away from the theoretical side and start working on our own simple class or two to perform simple tasks.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Homework&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Since we have mainly done theory so far, your homework this week is to surf Appleʼs developer website (you should have done this last week) and look at some of the classes available. If you donʼt know where to start, start with something such as NSString. Youʼll become more comfortable with the details of the parent class, the methods, and so on. This will be important later on when youʼre using classes outside of this series and you want to know what methods they inherit or use.&lt;/div&gt;&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;Next Time&lt;/h2&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Weʼll get more practical next week with some class coding. Classes really are central to Objective-C, so itʼs mega important that you come to grips with them and the goal of this series is to really ensure that you do!&lt;/div&gt;&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;As usual, if you have any questions or comments, you can reach me by dropping a comment or email. If youʼd like to get in touch with me personally and get a quick answer, send me a tweet!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/6365412289207297253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/learn-objective-c-day-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/6365412289207297253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/6365412289207297253'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/learn-objective-c-day-3.html' title='Learn Objective-C: Day 3'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-5786083419033542927</id><published>2012-05-01T13:17:00.003+07:00</published><updated>2012-05-01T13:17:45.708+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Learn Object-C"/><title type='text'>Learn Objective-C: Day 2</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Welcome to part two of this introductory series on Objective-C. After spending&amp;nbsp;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a96d00; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;last week&lt;/a&gt;&amp;nbsp;reviewing the fundamentals of the C language upon which Objective-C is built, this week we will transition to focusing on what makes Objective-C such a great language for software development. Specifically, we will discuss the fundamentals of Object Oriented Programming (OOP) and demonstrate how to create a class and send messages to objects in Objective-C.&lt;br /&gt;&lt;span id=&quot;more-2004&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Object Orientated Programming&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Why do we have Objective-C? Why not just use the underlying C language? The reason we have Objective-C is to give us an object oriented playground within which to build our applications. OOP is a programming paradigm that attempts to allow developers to think about software design in terms of objects and attributes instead of variables and functions. Specifically, OOP attempts to obtain data abstraction, encapsulation, modularity, polymorphism, and inheritance. The topic of OOP could easily fill a book (or a tutorial series) on its own, so instead I’ll introduce you to the basic principles by way of example.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Imagine that you have a car. You can think of your car as an object. There are many other cars in the world and you might even own more than one. Your car has various properties to it: make, model, color, engine type, and many more. In Object Oriented Programming terms, we would call the abstract concept of a car a “class” and the individual car that you own an object or instance (instantiated object) of the class. When a new car is manufactured, a new instance of the car class is instantiated (or created) and given its own set of properties.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Still a little fuzzy? Another great analogy is that of the cookie and the cookie cutter. The class is the cookie cutter, and the object is the cookie.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
So, why think in terms of objects? One of the best reasons is because this is how your brain naturally conceptualizes life in the real world, and there are many benefits to being able to abstract software development in similar terms.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Classes (and hence objects) are made up of methods and attributes. If you come from another programming language, you may be more familiar equating methods with functions and attributes with variables. We will discuss each in turn next.&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #373737; font-family: Helvetica, Arial; font-size: 30px; font-style: inherit; font-weight: normal; letter-spacing: -0.02em; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 20px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Methods&lt;/h3&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
So we have an “instance” of a car, now that what do we do with it? Well, we drive it and fill it with petrol, among other things. Driving and filling with petrol apply only to the cars that we use, meaning that when we fill up a car or drive a car, we are only impacting one instance, and not all the cars in the world. Therefore, filling up the car instance is considered an&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;instance method&lt;/em&gt;&lt;/strong&gt;. Itʼs something we do to our instance and only our instance.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
On the other hand, if we ask the original car class how many colors of car are available, this is a class method because we are no longer only talking about the car we drive around but all cars in general.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Many of these principles become more clear with use, so letʼs look at a little bit of syntax.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
In Objective-C, we call object methods by passing messages. When we want to know how much gas is in our instance of car, then we send a message to our instance and the message is the method we want to apply. Programmatically it looks like this:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;[recipient&amp;nbsp;message];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The brackets indicate we are sending a message. The first parameter is who should receive this message and the second parameter is what the message actually is. Finally, we end with a semi-colon as is common to most programming languages.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
So, with our previous example in mind, this is how we would interact with our instance of car to add gas to the tank;&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;[dansCar&amp;nbsp;addGas];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The example above assumes that we have instantiated an instance of the Car class and named it “dansCar.” We then pass the “addGas” message to the object “dansCar,” which is the equivalent of calling a function. In another language, this line might look like:&lt;/div&gt;
&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 11px; font-style: italic; font-weight: inherit; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;ins style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline-table; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;ins id=&quot;aswift_0_anchor&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: block; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; id=&quot;aswift_0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; name=&quot;aswift_0&quot; scrolling=&quot;no&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; left: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; top: 0px; vertical-align: baseline;&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-j&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;dansCar.addGas();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #373737; font-family: Helvetica, Arial; font-size: 30px; font-style: inherit; font-weight: normal; letter-spacing: -0.02em; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 20px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Attributes&lt;/h3&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Letʼs say our car class has a gas tank thatʼs stored as a percentage. For example, if the gas tank is at 50% then it is half-full and if it is at 100%, it means it is full to the brim. Now, if we want to know how much gas is in the tank, we donʼt just directly take that information from an attribute. Instead, we would use an accessor method to access the internal variable for us. Likewise, when we want to fill the tank, we donʼt just give the gas tank attribute a new percentage, we use a setter to update the attribute for us. This process is known as data encapsulation.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
What we mean by data encapsulation is that data is contained (so to speak) by methods meaning to access it we need to use methods. Some of you who have programmed in other languages and havenʼt heard of data encapsulation may be wondering why we do things this way. The answer is that by encapsulating data, there is a nice cushion between the developer of a class and the user of a class. Because the class methods manage and maintains the attributes within the class, they can more easily maintain data integrity. Another major benefit is that when a developer distributes his class, the people using it donʼt have to worry about the internals of the class at all. A developer may update a method to make it faster or more efficient, but this update is transparent to the user of the class as he/she still uses the same method with no change to his/her code.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This brings us nicely on to the next section weʼre going to look at, which is how Objective- C separates interface from implementation.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Interface and Implementation&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
When you create or work with a simple class in Objective-C you will see that it, by default, has two files. One is the implementation file which is a file that ends with a suffix of .m and the interface file which is a file that ends with a suffix of .h.&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #373737; font-family: Helvetica, Arial; font-size: 30px; font-style: inherit; font-weight: normal; letter-spacing: -0.02em; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 20px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Interface&lt;/h3&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&amp;lt;cocoa&amp;nbsp;cocoa.h=&quot;&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@interface&amp;nbsp;Car&amp;nbsp;:&amp;nbsp;NSObject&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//This&amp;nbsp;is&amp;nbsp;where&amp;nbsp;attributes&amp;nbsp;go&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;fillLevel;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//This&amp;nbsp;is&amp;nbsp;where&amp;nbsp;methods&amp;nbsp;go&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-&amp;nbsp;(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)addGas;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/cocoa&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
First of all, weʼre importing Cocoa.h which is a standard library with a lot of reusable code that we can use inside our app.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Next, weʼre declaring that this is the interface for the Car, but weʼre also putting NSObject into that declaration. Adding “: NSObject” means that the Car class inherits from the NSObject class. We’ll talk more about inheritance in a future tutorial.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Our instance variable “fillLevel” is declared next, and we specify that it is of the “float” data type so we can easily represent a percentage.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The next line declares our “addGas” method. The “-” indicates that this is an instance method, not a class method. The “(void)” portion means that the method will not return anything back when it finishes executing. If the class was going to return an integer, this would be changed to “(int)” and the same for any other data type. Finally, we finalize the method declaration with a semicolon.&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #373737; font-family: Helvetica, Arial; font-size: 30px; font-style: inherit; font-weight: normal; letter-spacing: -0.02em; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 20px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Implementation&lt;/h3&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-2/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#import&amp;nbsp;&quot;Car.h&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@implementation&amp;nbsp;Car&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-(&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;)&amp;nbsp;addGas&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;code&amp;nbsp;goes&amp;nbsp;here&amp;nbsp;to&amp;nbsp;add&amp;nbsp;gas&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@end&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The implementation in this case contains the method to add gas to the tank. We also import Car.h, which is the interface file. Where our addGas method sits, we could add many more methods, but today’s scope is to simply get you to understand how classes work rather than make a fully-fledged class.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Next Time&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Next time weʼll be looking more in depth at methods and at using variables with methods (as well as the basics of managing variables in Objective-C). This tutorial wasn’t too long as itʼs often a bit confusing for new developers as to why we separate classes in to more than one file. If youʼre feeling at all confused then please re-read the above or ask questions in the comments section below. Classes will be a constant reoccurrence in this series and itʼs important you understand how they work.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Challenge&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Seeing as this part of the series was fairly theoretical, thereʼs not too much you can do to practice. However, I do recommend this week that you sign up for Appleʼs developer website as itʼs an invaluable reference. Once youʼve done that, have a snoop around some of their downloadable classes and download a few simple ones. You donʼt need to understand all of the code, just look at how the classes are formed and separated across files.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/5786083419033542927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/05/learn-objective-c-day-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5786083419033542927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5786083419033542927'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/05/learn-objective-c-day-2.html' title='Learn Objective-C: Day 2'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4995643625660047452</id><published>2012-04-30T13:00:00.000+07:00</published><updated>2012-04-30T13:00:33.996+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Learn Object-C"/><title type='text'>Learn Objective-C: Day 1</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Welcome to my series on coming to grips with the awesome language that is Objective-C. Throughout this small series of articles, my aim is to take you from no prior experience with Objective-C to using it confidently in your own applications. This isnʼt a rush job – so donʼt expect to just skim through the basics and be away – weʼll be going through not just the bare essentials, but also the best practices you can apply to ensure your code is the best it can be. Letʼs jump straight in!&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;span id=&quot;more-1844&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
What is Objective-C?&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
If youʼre reading this series then Iʼll hazard a guess that you already know, but for those of you who donʼt, donʼt worry as by the end of this part youʼll know what it is back-to-front and inside-out.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Objective-C is an object oriented language which lies on top of the C language (but I bet you guessed that part!). Itʼs primary use in modern computing is on Mac OS X as a desktop language and also on iPhone OS (or as it is now called: iOS). It was originally the main language for NeXTSTEP OS, also known as the operating system Apple bought and descended Mac OS X from, which explains why its primary home today lies on Appleʼs operating systems.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Because Objective-C is a strict superset of C, we are free to use C in an Objective-C file and it will compile fine. Because any compiler of Objective-C will also compile any straight C code passed into it, we have all the power of C along with the power of objects provided by Objective-C.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
If youʼre a little confused at this point, think of it this way: everything C can do, Objective-C can do too, but not the other way around.&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
What will I need?&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Throughout this series, we will not focus on building applications for the iPhone. Instead, we will concentrate more on the language itself and for this reason all you will need is a Mac with a compiler such as GCC. If youʼve installed the developer tools from Apple (Xcode, Interface Builder, etc), then GCC should already be installed. If not, then head to&amp;nbsp;&lt;a href=&quot;http://developer.apple.com/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a96d00; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;Appleʼs developer website&lt;/a&gt;&amp;nbsp;and get yourself a free copy.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
As far as prerequisites go, while I donʼt expect you to have a full background in computer science, some knowledge of programming in general or of C in particular would definitely be a bonus. If you donʼt have much prior programming experience, donʼt worry -youʼll pick it up in no time!&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
If youʼre running Windows (which is unlikely as this tutorial is aimed at iPhone developers) you can still compile Objective-C on your system using a compiler such as CygWin or MinGW. This tutorial series is catered to Mac users, but if you are using Windows and encounter any problems then be sure to leave a comment and Iʼll see if I can help.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Compiling your code&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Before you can see your code in action, you need to be able to compile it into something executable. Hopefully you now have your copy of GCC ready. Compiling is really easy, a simple one line command.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NOTE:&lt;/strong&gt;&lt;br /&gt;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Compiling is the process of “translating” a high-level computer language, like Objective-C or PHP, into a low-level machine code that can be processed by a computer when the program is executed.&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
All the programs that we see running in our fancy Mac OS operating system consist of a series of instructions that are visually displayed to us in a GUI, or Graphical User Interface. In contrast to the GUI program interaction with a mouse that most of us are familiar with, it is possible to issue commands directly to the operating system through a text-based interface known as a “terminal” or “command line.”&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The command line application in Mac OS is called Terminal and can be found in&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Applications -&amp;gt; Utilities&lt;/strong&gt;. Go ahead and open Terminal now (you can also search for it in Spotlight). Terminal has several basic commands you should be aware of in order to properly utilize it. One of the most important commands to know is&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd&lt;/strong&gt;, which stands for “change directory.” This command allows us to change where in the filesystem Terminal is reading from. We canʼt just tell Terminal to compile our file if we donʼt show it where the file is first! To switch to a desired directory, you can use a full path such as:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd&amp;nbsp;/Users/MyName/Desktop/Test&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
You can also use relative paths, allowing you to only type a single folder name in some cases. For example, if youʼre already in your Desktop folder, you could simply type:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd&amp;nbsp;Test&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
to get to the Test folder.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
What if you want to see where you currently are? The immediate folder name is displayed before the prompt (the bit where you type). For example, if your prompt says&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Dan- Walkers-MacBook: Desktop iDemonix$&lt;/strong&gt;&amp;nbsp;I can assume Iʼm in the Desktop folder. If you aren’t sure, you can also type&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;pwd&lt;/strong&gt;&amp;nbsp;to display the absolute filepath of the current location.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
If you want to list what files and folders are in the current folder, use the list command:&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;ls&lt;/strong&gt;. Finally, if you wish to go up a directory to a parent folder, type “&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd ..&amp;nbsp;&lt;/strong&gt;“. So, if we were in the Test folder, which is inside the Desktop folder, but we wanted to go to the Desktop folder instead, we could type&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd ..&amp;nbsp;&lt;/strong&gt;to go up to the parent directory, Desktop. If we wanted to get to the home directory we would type&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd ../..&lt;/strong&gt;&amp;nbsp;to go up two levels. Alternatively, to get to the home directory you can just type&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd ~&lt;/strong&gt;&amp;nbsp;from anywhere.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
When using the Terminal application, compiling looks like this:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;gcc&amp;nbsp;inputfile.m&amp;nbsp;-o&amp;nbsp;outputfile&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Youʼve probably already guessed how it works:&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;inputfile.m&lt;/strong&gt;&amp;nbsp;contains our code (.m is the extension used for Objective-C files) and&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-o&lt;/strong&gt;&amp;nbsp;tells gcc we want our executable to be called whatever we specify next, which in the example above is&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;outputfile&lt;/strong&gt;. To run our creation after compiling, we simply type:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;./outputfile&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Simple.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
When you compile, the compiler will generate any errors, notifications or warnings related to the syntax of your code. Errors generated when compiling are understandably referred to as “compile-time” errors, and this is often the most stressful part of writing an application (especially when your code isnʼt compiling because you put a single character in the wrong place or forgot to end a line with a semi-colon). Compiling can also take time when youʼre writing large applications consisting of multiple files, which is also another reason why compiling can be a tedious experience. This fact has led to a ubiquitous programmer joke often seen on the t-shirts of men with unkempt beards:&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;“I’m not slacking off. My code is compiling.”&lt;/em&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
The Basics&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Objective-C itself isnʼt that hard to learn. Once you get to grips with the basic principles, you can pick the rest up as you go along pretty easily. You do need to have an understanding of the fundamentals of C programming though, and that is what the rest of this tutorial will cover.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Letʼs look at a basic application in C:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#include&amp;nbsp;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Hello&amp;nbsp;World\n&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
All this application will do when you run it is display the string “Hello World” in Terminal and exit.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;NOTE:&lt;/strong&gt;&lt;br /&gt;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Curious about the “return 0″ statement? Because we told the compiler that the function main() will return an integer, we return the constant integer value ’0′ at the end of the function. By convention, returning ’0′ signals to the calling program that our program finished execution without any errors.&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
To try this for yourself, fire up Xcode and make a new Objective-C class. Delete all the code Xcode gives you by default and stick the above code in. Once youʼve done that, you can compile it using Terminal. Open Terminal and change to the location where your file is, if you saved to the desktop then simply type&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd desktop&lt;/strong&gt;&amp;nbsp;so that Terminal is now reading from your Desktop. Then type this command:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;gcc&amp;nbsp;program1.m&amp;nbsp;-o&amp;nbsp;program1&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Your program should compile with no errors. To run it, simply type:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;./program1&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Then hit return.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Awesome, so what actually happened there? Well, first we imported a library called stdio which manages the standard i/o (input output) functions, like printf(). We then create a function called main which should return an int or integer which is basically a number with no decimal point. We then use the printf() function to output ʻHello Worldʼ in to terminal. The \n we use tells Terminal to put a newline after the text. Finally, we return 0 (remember we said main should return an integer) which tells the operating system everything went fine. We use the name main because this is triggered automatically when the program is executed.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
So far everything should be pretty simple: we wanted to write some text to Terminal, so we imported a library with a function for writing text, then we used a function from that library to write the text. Imagine that what you import is a physical library and printf() is one of the books available.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Variables&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Soldiering ahead, weʼre now on to variables. One of the fundamental things we need to be able to do in our applications is temporarily store data. We do this using variables, which are containers that can hold various types of data and be manipulated in various ways. We use variables to store all sorts of data, but we must first tell the compiler what weʼre going to store in it. Here are several of the most important variables that you should know about for now:&lt;/div&gt;
&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f4f4f4; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-family: inherit; font-size: 11px; font-style: italic; font-weight: inherit; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;ins style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: inline-table; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;ins id=&quot;aswift_0_anchor&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; display: block; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; height: 250px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; vertical-align: baseline; visibility: visible; width: 300px;&quot;&gt;&lt;iframe allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; height=&quot;250&quot; hspace=&quot;0&quot; id=&quot;aswift_0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; name=&quot;aswift_0&quot; scrolling=&quot;no&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 11px; font-style: inherit; font-weight: inherit; left: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: absolute; top: 0px; vertical-align: baseline;&quot; vspace=&quot;0&quot; width=&quot;300&quot;&gt;&lt;/iframe&gt;&lt;/ins&gt;&lt;/ins&gt;&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/strong&gt;&amp;nbsp;– for storing integers (numbers with no decimal point)&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;char&lt;/strong&gt;&amp;nbsp;– for storing a character&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;float&lt;/strong&gt;&amp;nbsp;– for storing numbers with decimal points&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;double&lt;/strong&gt;&amp;nbsp;– same as a float but double the accuracy&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
When weʼre not using variables, weʼre often using constants. A constant will never change: we always know what the value will be. If we combine constants we get a constant expression, which we will always know the result of. For example:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;123&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;125&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This is a constant expression, 123 + 2 will always equal 125, no matter what. If we substituted a constant for a variable, the new expression would look like this:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;123&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;=&amp;nbsp;?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Because i is a dynamic variable, we do not definitely know the result of this equation. We can change i to whatever we want and get a different result. This should give you an idea of how variables work.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
One thing we still need to know is how do we display variables like we displayed “Hello World” above? We still use the printf() function, except it changes a little this time:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#include&amp;nbsp;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;someNumber&amp;nbsp;=&amp;nbsp;123;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;My&amp;nbsp;number&amp;nbsp;is&amp;nbsp;%i&amp;nbsp;\n&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;someNumber);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
What weʼve done here is told the function printf() where we want our integer to appear, then where it can be found. This is different to a lot of languages such as PHP where you could just place the variable in the text.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
We are not just limited to just one variable in printf(). The function can accept multiple parameters separated by commas, so we can pass in as many as we have formatting signs for in the text. Above we use %i as a formatting sign because we were including an integer. Other variables have their own format specifiers:&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;%i&lt;/strong&gt;&amp;nbsp;– integer&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;%f&lt;/strong&gt;&amp;nbsp;– float&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;%e&lt;/strong&gt;&amp;nbsp;– double&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://mobile.tutsplus.com/wp-content/themes/tuts/images/global/li.gif); background-origin: initial; background-position: 0px 8px; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 10px; margin-left: 5px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;%c&lt;/strong&gt;&amp;nbsp;– char&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
One thing I want to touch on before we move on is the char type. A variable of type char can only handle single characters, when thatʼs all we need this is great, but if we need a string of text itʼs pretty useless. To get round this, we use something called a character array.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Imagine you have a sentence that is 11 characters long (like ʻHello Worldʼ – donʼt forget to include the space), a character array is like having 11 charʼs but all glued together. This means that the value of the character array overall is ʻHello Worldʼ but char[0] is ʻHʼ. In brackets is the char youʼre after, because we put 0 we get the first character. Donʼt forget that counting in arrays usually starts from 0, not 1.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Conditionals&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
When an application needs to make a decision, we use a conditional. Without conditionals, every time you ran your application it would be exactly the same, like watching a movie. By making decisions based on variables, input or anything else, we can make the application change – this could be as simple as a user entering a serial number or pressing a button more than 10 times.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
There are a few different types of conditionals, but for now weʼre just going to look at the most common and basic: the&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;if&lt;/strong&gt;&amp;nbsp;statement. An if statement does what it sounds like, it checks to see if something is true, then acts either way. For example:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;preprocessor&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;#include&amp;nbsp;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(1&amp;nbsp;==&amp;nbsp;1)&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;This&amp;nbsp;is&amp;nbsp;always&amp;nbsp;true&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;Do&amp;nbsp;some&amp;nbsp;stuff&amp;nbsp;here&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
If 1 is equal to 1, then whatever is between the brackets is executed. You might also be wondering why we used two equals signs instead of one. Using two equal signs is an equality operator, which checks to see if the two are equal to each other. If we use a single equal sign then weʼre trying to assign the first value to the second value.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Above, since 1 will always be the same as 1, whatever is in the brackets would be executed. What if we wanted to do something if this wasnʼt true though? Thatʼs where&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;else&lt;/strong&gt;&amp;nbsp;comes in. By using else we can run code when the if conditional returns false, like so:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main(){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(1==1){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;Do&amp;nbsp;some&amp;nbsp;stuff&amp;nbsp;here.&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;The&amp;nbsp;universe&amp;nbsp;is&amp;nbsp;broken!&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Of course, in real life, we wouldn’t be checking to make sure 1 is the same as 1, but the point is made. Consider an application that closes if you press the close button three times (annoying but relevant). You could check in the brackets to see how many times it has been pushed. If it is lower than 3, then your else block could execute code to tell the user how many more times the button must be pushed to exit.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Weʼll look at conditionals more when we come to use them in our applications further along in the series.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Loops&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Now let’s investigate a programming loop. Loops, as the name suggests, let us loop through a piece of code and execute it multiple times. This can come in very handy in situations such as populating a list or repeating a piece of code until a conditional returns true.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
There are three types of loops, in order of most common:&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;for&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;while&lt;/strong&gt;, and&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;do&lt;/strong&gt;. Each one is used to repeat execution of a block of code, but they function differently. Here are examples of each:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;if&amp;nbsp;loop&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;i&amp;nbsp;=&amp;nbsp;9;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;(x&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;x&amp;nbsp;&amp;lt;&amp;nbsp;i;&amp;nbsp;x++){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Count&amp;nbsp;is:&amp;nbsp;%i\n&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;x);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This may look a little complex at first, but it really isnʼt. In the parentheses after for is the initiator, a conditional, and the action. When the for loop starts it executes the initiator, which in our case above sets x to 0. Each time the loop runs (including the very first time) it checks the conditional, which is &quot;is x smaller than i?&quot; Finally, after each loop through the code, the loop runs the action - which above increments x by one. Simple. Since x is increasing by one each time, x will soon no longer be less than i and the loop will finish and the program will carry on running.&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;while&amp;nbsp;loop&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;(x&amp;nbsp;&amp;lt;&amp;nbsp;10){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Count&amp;nbsp;is:&amp;nbsp;%i\n&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;x);&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//Watch&amp;nbsp;OUT!&amp;nbsp;Something&amp;nbsp;is&amp;nbsp;missing.&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Similar to the for loop, the while loop will execute the code between the brackets until the conditional is false. Since x is 0 and we don&#39;t change it in the code block, the above would run forever, creating an &quot;infinite loop.&quot; If you wish to increment x, then in the case of our while loop you would do this between the brackets:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;while&amp;nbsp;loop&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;(x&amp;nbsp;&amp;lt;&amp;nbsp;10){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Count&amp;nbsp;is:&amp;nbsp;%i\n&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;x);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The do loop is essentially the while loop, except the conditional runs after the block of code. What this means is when using a do loop, the code is guaranteed to run at least once:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;do&amp;nbsp;loop&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;main&amp;nbsp;()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;x&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;do&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;printf(&lt;span class=&quot;string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&quot;Count&amp;nbsp;is:&amp;nbsp;%i\n&quot;&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&amp;nbsp;x);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(x&amp;nbsp;&amp;lt;&amp;nbsp;10);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #006699; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Pointers&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Pointers can cause a lot of confusion with newcomers to programming or just newcomers to C. It is also not immediately clear to some people how they are useful, but youʼll gradually learn this over time. So, what is a pointer?&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
As the name implies, pointers point to a location. Specifically, locations in computer memory. Think of it like this, when we create a variable (let&#39;s say it&#39;s an integer called ʻfooʼ as is so popular with programming theory) and give it a value of, for example 123, we have just that - a variable with a value of 123. Now, if we setup a pointer to foo, then we have a way of indirectly accessing it. That is, we have a pointer of type int that points to foo which holds the value &#39;123.&#39; This would be done in code like so:&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; vertical-align: baseline; width: 673px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;&quot;&gt;
&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://mobile.tutsplus.com/tutorials/iphone/learn-objective-c-day-1/#&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-size: 9px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-cpp&quot; start=&quot;1&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;foo&amp;nbsp;=&amp;nbsp;123;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;This&amp;nbsp;is&amp;nbsp;an&amp;nbsp;integer&amp;nbsp;variable&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;datatypes&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: seagreen; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;*ptr&amp;nbsp;=&amp;nbsp;&amp;amp;foo;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #008200; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;//&amp;nbsp;This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;pointer&amp;nbsp;to&amp;nbsp;an&amp;nbsp;integer&amp;nbsp;variable&lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Clear as mud? Donʼt sweat it. Pointers are hard - often considered the hardest thing to learn when picking up the C language. Pointers will eventually become second nature to you though, and there will be more on pointers within Objective-C further in this series.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Wrapping Up&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
You&#39;ve just been given a crash-course overview of the C language fundamentals. This part of the series was intended to be a quick primer on C to get you ready and prepared for the rest of the series, and should have been especially useful to those who are already familiar with programming in another language. If you are new to programming in general or are still in doubt about any basic of C, re-read the above and feel free to leave questions in the comments.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Before next time, be sure to try and compile your own programs using the code above. Set yourself small challenges, such as making a loop execute 10 times and count each time through the loop using printf. Thereʼs no harm in trying and experimenting, if it goes wrong then itʼs probably even better as itʼll get you on the right track to troubleshooting your own code.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Challenge&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
For this week, we will end on a simple challenge. You are to create three programs that count to 10 using each type of loop. Since we will use loops often in Objective-C, itʼs good that you learn to create them by heart. That should be pretty easy, so try to count down from 10 to 1 afterwards (if ++ increments by one, what could be the code to decrement by 1?).&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Helvetica, Arial; font-size: 36px; font-style: inherit; font-weight: bold; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;&quot;&gt;
Next Time&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
In the next installment of this series, Iʼll provide an overview of how Objective-C works. Weʼll also look at object orientated programming and its uses, as well as really drill down into classes, instances, methods, inheritance and more.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 14px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Next week should really help you to understand what makes Objective-C such a great language and why it really extends the C language in so many useful ways.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4995643625660047452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/learn-objective-c-day-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4995643625660047452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4995643625660047452'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/learn-objective-c-day-1.html' title='Learn Objective-C: Day 1'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-262388455500325232</id><published>2012-04-28T00:27:00.002+07:00</published><updated>2012-04-28T00:27:24.257+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cydia"/><title type='text'>Creating A Cydia Repository/Source For iOS! [Covering Everything A-Z]</title><content type='html'>&lt;em&gt;        &lt;/em&gt;
        

                  
&lt;br /&gt;
&lt;div style=&quot;clear: both; margin-left: 13px; margin-top: 20px;&quot;&gt;
&lt;div class=&quot;addthis_toolbox addthis_default_style &quot;&gt;
This tutorial will explain the &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD3&quot;&gt;process&lt;/span&gt; of creating a &lt;a href=&quot;http://www.ijailbreak.com/cydia/introducing-the-official-ijailbreak-repository/&quot; target=&quot;_blank&quot;&gt;Cydia repository&lt;/a&gt;
 from start to finish. We will cover everything from the initial 
preparation all the way to the hosting and publishing of your Cydia 
repository. This tutorial will get moderately technical and is not 
recommended for users who are new to computers or new to the whole 
jailbreaking scene. I will provide support for this tutorial through the
 comments section, but you can also contact me directly at: 
jaden@ijailbreak.com&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;copy fix&quot;&gt;
&lt;div class=&quot;textcontent&quot;&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/ijailbreak_chalkboard.jpg&quot;&gt;&lt;img alt=&quot;ijailbreak_chalkboard&quot; class=&quot;size-full wp-image-27187  aligncenter&quot; height=&quot;333&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/ijailbreak_chalkboard.jpg&quot; title=&quot;ijailbreak_chalkboard&quot; width=&quot;525&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&amp;nbsp;&lt;/h3&gt;
&lt;h3&gt;
What is a Cydia Repository?&lt;/h3&gt;
Well if you are following this tutorial I would like to hope that you
 have some knowledge of what a Cydia repository is, but if you do not 
then here is a quick summery. A Cydia repository for short is just a 
Debian APT repository, and this meaning that anything you can &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD4&quot;&gt;install&lt;/span&gt; (ie through Cydia) is considered to be a &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD11&quot;&gt;package&lt;/span&gt;. These so called &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD5&quot;&gt;packages&lt;/span&gt;
 exist in the form of .deb files, which have a rather interesting 
internal format. At a high level, a .deb contains the files that are 
going to be installed on your ipodtouch/iphone, which is a part of &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD10&quot;&gt;the package&lt;/span&gt; and also “control” information which comprises of metadata about the package (its name, size, and other details). &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD12&quot;&gt;The construction&lt;/span&gt;
 of such a file is done by using a tool called dpkg-deb. Users of Debian
 (or Fink on a Macintosh, which is also based on APT) will already have 
this package installed, but users of almost any other platform are able to install it easily.&lt;br /&gt;

&lt;div&gt;

&lt;strong&gt;Table of Contents&lt;/strong&gt;&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#1&quot;&gt;pre-requirements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#2&quot;&gt;Installing a Virtual Machine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Creating Files for your Repository – &lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#3&quot;&gt;A Theme&lt;/a&gt;, An &lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#4&quot;&gt;Application&lt;/a&gt; or a &lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#5&quot;&gt;Ringtone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#6&quot;&gt;Prepping Ubuntu to create a Cydia Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#7&quot;&gt;Creating the Cydia Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#&quot;&gt;Creating a unique Depiction Page (Coming Soon)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;em&gt;&lt;strong&gt;1) Web Server/Hosting Space -&lt;/strong&gt;&lt;/em&gt; A Cydia 
repository is a Debian APT repository that is hosted on server, so users
 can then browse through the contents of your repository and download 
the packages that are hosted on your repository to their &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD9&quot;&gt;iPod Touch&lt;/span&gt;/iPhone.
 In order for you to create your own Cydia repository you will need to 
have some kind of a server or hosting space available to you.&lt;br /&gt;

&lt;em&gt;&lt;strong&gt;2) A Computer with Linux/Ubuntu 8.10 plus -&lt;/strong&gt;&lt;/em&gt;
 If you are running either windows or Mac there are many ways to run 
Ubuntu without disturbing your current operating system. In this 
tutorial I will show you how to set up a virtual machine running Ubuntu 
that will run on both Windows and Mac OSX operating systems. There is 
also the option of dual booting your computer to run Ubuntu however I 
will not be going into detail on this subject. **Note fink on Macintosh 
will work, but because I don’t have a mac to test it on I can not 
guarantee anything… You can &lt;a href=&quot;http://www.ubuntu.com/&quot; target=&quot;_blank&quot;&gt;DOWNLOAD UBUNTU HERE&lt;/a&gt;.&lt;br /&gt;

&lt;em&gt;&lt;strong&gt;3) Patience and an hour or two – &lt;/strong&gt;&lt;/em&gt;Creating a
 Cydia repository (especially if your new to this sort of thing), can be
 very challenging and time consuming. Don’t give up if you are getting 
frustrated, if at any point during this tutorial you need help please 
post any questions/comments in the comments section below.&lt;br /&gt;

&lt;h3&gt;
Further Reading&lt;/h3&gt;
&lt;em&gt;&lt;strong&gt;Jay Freeman&lt;/strong&gt;&lt;/em&gt; aka &lt;em&gt;&lt;strong&gt;Saurik&lt;/strong&gt;&lt;/em&gt;;
 the creator of Cydia, Winterboard, Cycorder and many other well known 
applications, is the one who made this all possible. He wrote a great 
introduction to creating a Cydia repository that will take on a more 
advanced/technical aspect. If you are looking for more information on 
this subject please visit the link below…&lt;br /&gt;

&lt;a href=&quot;http://www.saurik.com/id/7&quot; target=&quot;_blank&quot;&gt;http://www.saurik.com/id/7&lt;/a&gt;&lt;br /&gt;

&lt;em&gt;&lt;strong&gt;Step 1)&lt;/strong&gt;&lt;/em&gt; The first thing we need to do before we can create your Cydia repository is to install and setup a virtual machine that will run Ubuntu. A virtual machine runs like an &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD8&quot;&gt;application&lt;/span&gt;
 on your current operating system but emulates the operating system of 
your choice (in this case Ubuntu) through a virtual hardrive. Go to &lt;a href=&quot;http://www.virtualbox.org/wiki/Downloads&quot; target=&quot;_blank&quot;&gt;VirtualBox.com&lt;/a&gt;
 and click on the download that corresponds to your operating system 
that you are running right now. Wait for VirtualBox to fully download 
before continuing to the next step…&lt;br /&gt;

&lt;em&gt;&lt;strong&gt;Step 2)&lt;/strong&gt;&lt;/em&gt; With virtual Box now downloadew, we are going to double click on the Setup.exe to begin the &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD7&quot;&gt;installation&lt;/span&gt; process. Follow the Screenshots and Instructions presented to you below…&lt;br /&gt;

(If you know how to&lt;a href=&quot;http://www.ijailbreak.com/cydia/the-ultimate-tutorial-for-creating-a-cydia-repository-covering-everything-a-z/#3&quot;&gt; install VirtualBox Click Here&lt;/a&gt; to skip these screenshots)&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/screen1-2.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27234&quot; height=&quot;409&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/screen1-2.jpg&quot; title=&quot;screen1-2&quot; width=&quot;530&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen2.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27236&quot; height=&quot;407&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen2.jpg&quot; title=&quot;Screen2&quot; width=&quot;526&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen3.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27237&quot; height=&quot;413&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen3.jpg&quot; title=&quot;Screen3&quot; width=&quot;530&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen4.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27238&quot; height=&quot;406&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen4.jpg&quot; title=&quot;Screen4&quot; width=&quot;522&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen5.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27241&quot; height=&quot;405&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen5.jpg&quot; title=&quot;Screen5&quot; width=&quot;520&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen6.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27242&quot; height=&quot;403&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen6.jpg&quot; title=&quot;Screen6&quot; width=&quot;522&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen7.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27243&quot; height=&quot;404&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen7.jpg&quot; title=&quot;Screen7&quot; width=&quot;519&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen8.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27244&quot; height=&quot;406&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen8.jpg&quot; title=&quot;Screen8&quot; width=&quot;520&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Step 3) -&lt;/strong&gt; With VirtualBox now installed we are going to need to download a copy of Ubuntu. Go to &lt;a href=&quot;http://www.ubuntu.com/getubuntu/download&quot; target=&quot;_blank&quot;&gt;www.ubuntu.com&lt;/a&gt; and download the latest version of Ubuntu to your computer.&lt;br /&gt;

&lt;strong&gt;Step 4) -&lt;/strong&gt; When Ubuntu finishes &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD6&quot;&gt;downloading&lt;/span&gt;
 go back to the VirtualBox interface and click the New Button (The 
Button that says New with the Blue badge icon; on the top left of the 
screen). Follow the Screenshots to finish &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD2&quot;&gt;configuring&lt;/span&gt; VirtualBox to run Ubuntu…&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen9.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27245&quot; height=&quot;476&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen9.jpg&quot; title=&quot;Screen9&quot; width=&quot;555&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen10.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27247&quot; height=&quot;477&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen10.jpg&quot; title=&quot;Screen10&quot; width=&quot;551&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen11.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27248&quot; height=&quot;477&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen11.jpg&quot; title=&quot;Screen11&quot; width=&quot;545&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen12.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27249&quot; height=&quot;476&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen12.jpg&quot; title=&quot;Screen12&quot; width=&quot;552&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen13.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27250&quot; height=&quot;477&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen13.jpg&quot; title=&quot;Screen13&quot; width=&quot;546&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen14.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27251&quot; height=&quot;482&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screen14.jpg&quot; title=&quot;Screen14&quot; width=&quot;551&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
When you get to the Finish Screen press the &lt;em&gt;&lt;strong&gt;Finish Button&lt;/strong&gt;&lt;/em&gt; and continue to the next step below…&lt;br /&gt;

&lt;strong&gt;Step 5) – &lt;/strong&gt; With VirtualBox now configured to run 
Ubuntu you can hit the run button from your VirtualBox interface now. 
From here its going to ask us to locate our operating system file; click
 the &lt;em&gt;&lt;strong&gt;ISO IMAGE&lt;/strong&gt;&lt;/em&gt; option and then locate your &lt;em&gt;&lt;strong&gt;Ubuntu.iso&lt;/strong&gt;&lt;/em&gt; file that you downloaded previously. Once you have your &lt;em&gt;&lt;strong&gt;Ubuntu.iso&lt;/strong&gt;&lt;/em&gt; file selected click the &lt;em&gt;&lt;strong&gt;ok Button&lt;/strong&gt;&lt;/em&gt; and follow the rest of the easy instructions presented to you by Ubuntu to &lt;span class=&quot;IL_AD&quot; id=&quot;IL_AD1&quot;&gt;configure&lt;/span&gt; the Ubuntu Operating System.&lt;br /&gt;

&lt;strong&gt;Switching Back over to the Repository…&lt;/strong&gt;&lt;br /&gt;

Now that we have VirtualBox successfully installed take a few minutes
 to get used to Ubuntu and its features. Ubuntu works like almost all 
other operating systems, but like all new things it can take some time 
getting used to. Once you have familiarized yourself with Ubuntu we are 
going to begin the creation of your Cydia repository.&lt;br /&gt;

The first step to creating your Cydia repository is to actually have a
 program or a theme that you are going to host in your repository. If 
you already have a program or a theme to host you can skip this step, 
however if you do not have one then we are going to need to create one.&lt;br /&gt;

If you remember from earlier in this post we learn’t that Cydia works like a Debian APT repository and anything that you install from Cydia comes in the form of packages. These packages have specific file structures depending on whether they are an application or a theme.&lt;br /&gt;

If you want to create a theme for your repository you are going to need the following file structure.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Theme.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27255&quot; height=&quot;450&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Theme.jpg&quot; title=&quot;Theme&quot; width=&quot;345&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Obviously this theme wont look like anything but you get the point 
that this is the file structure for a theme. If you want to replace the 
images inside the MyTheme.theme folder go ahead, I simply used blank 
files and renamed them to make this file structure.&lt;br /&gt;

&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/MyTheme.zip&quot;&gt;&lt;em&gt;&lt;strong&gt;You can Download this Theme File Here or you can create it yourself…&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;

If you want to create an application for your repository you are going to need the following file structure.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/applicationfilestructure.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-27256&quot; height=&quot;372&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/applicationfilestructure.jpg&quot; title=&quot;applicationfilestructure&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Again obviously this application won’t do anything but you get the point that this is the file structure for an application.
 If you want to replace the files inside the MyProgram.app folder go 
ahead, I simply used blank files and renamed them to make this file 
structure.&lt;br /&gt;

&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/MyApplication.zip&quot;&gt;&lt;em&gt;&lt;strong&gt;You can Download this Application File Here or you can create it yourself…&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;

If you want to create a ringtone for your repository you are going to need the following file structure.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/ringtone_filestructure.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27189  aligncenter&quot; height=&quot;262&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/ringtone_filestructure.jpg&quot; title=&quot;ringtone_filestructure&quot; width=&quot;339&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Again obviously unless you replace the blank files with actual files, this ringtone will not function; but you get the idea.&lt;br /&gt;

&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/MyRingtone.zip&quot;&gt;&lt;em&gt;&lt;strong&gt;You can Download this Ringtone File Here or you can create it yourself…&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;&lt;br /&gt;

&lt;em&gt;&lt;strong&gt;Step 1) -&lt;/strong&gt;&lt;/em&gt; Now that we have our Application,
 Theme or ringtone we need to actually put information into our control 
file. ** Note If you haven’t created a control file yet go into your Application
 or Theme folder and inside the DEBIAN folder right click and click 
create new document. A blank file will appear; name it “control” exactly
 as shown. Then double click the file to start editing it. You are going
 to need the following information inside your control file…&lt;br /&gt;

&lt;blockquote&gt;
&lt;em&gt;Package&lt;/em&gt;: this is the identifier of the package and this should be all lower case. It is similar to the bundleIdentifier in Apple’s Info.plist file.&lt;br /&gt;
&lt;em&gt;Name&lt;/em&gt;: The Name of your Application or Theme.&lt;br /&gt;
&lt;em&gt;Version&lt;/em&gt;: Your Application or Theme’s version number.&lt;br /&gt;
&lt;em&gt;Architecture&lt;/em&gt;: This line will almost always be “iphoneos-arm” if you are writing for firmware generations 2.x/3x.&lt;br /&gt;
&lt;em&gt;Depends&lt;/em&gt;: Only use this field if your Application or Theme depends on another program. An example would be a theme; it depends on Winterboard in order to function.&lt;br /&gt;
&lt;em&gt;Description&lt;/em&gt;: a description of your program. (Ignore this field if you used depiction.)&lt;br /&gt;
&lt;em&gt;Depiction&lt;/em&gt;: This loads a URL into an iframe instead of using the
 description line. You should use this to display custom links and/or 
screenshots.&lt;br /&gt;
&lt;em&gt;Maintainer&lt;/em&gt;: package builder; the person to contact for problems. ( format “Name &amp;lt;email address&amp;gt;”)&lt;br /&gt;
&lt;em&gt;Author&lt;/em&gt;: who wrote the software. ( same format as Maintainer)&lt;br /&gt;
&lt;em&gt;Sponsor&lt;/em&gt;: financial provider for your package. (format “Name &amp;lt;website&amp;gt;)&lt;br /&gt;
&lt;em&gt;Section&lt;/em&gt;: The category in Cydia in which your application or theme belongs to.&lt;/blockquote&gt;
Once you are done editing your control file make sure it looks something like the screenshot below. **Note &lt;strong&gt;Make SURE TO HIT “ENTER” AT THE END TO HAVE A BLANK LINE ON THE BOTTOM OF YOUR CONTROL FILE…&lt;/strong&gt;&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Capture.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27257 aligncenter&quot; height=&quot;411&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Capture.jpg&quot; title=&quot;Capture&quot; width=&quot;493&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 2) -&lt;/strong&gt;&lt;/em&gt; With your Application or Theme’s 
control file now finished you are done with the creation of your package
 that you are going to host in your Cydia repository . The next thing 
you need to do is begin preparing to create a .deb file out of your 
Application or Theme. In order to create a .deb file you are going to 
need a couple tools that will create the .deb files in Ubuntu.&lt;br /&gt;

&lt;em&gt;&lt;strong&gt;&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2009/12/cydiarepo.zip&quot; target=&quot;_blank&quot;&gt;Download the Tools Packages Here.&lt;/a&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;

When the download is successfully completed it should be on your desktop or in the downloads folder.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot1.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27258 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot1.jpg&quot; title=&quot;Screenshot1&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Find the cydiarepo.zip file that you downloaded and extract the 
archived file to your desktop so you can use them. To do this right 
click on the cydiarepo.zip and hit the extract button, and once the 
files are done extracting you should be left with the files depicted 
below.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot2.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27259 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot2.jpg&quot; title=&quot;Screenshot2&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Once the files are extracted we are going to need to transfer them to
 their respected locations. We are going to do this through an 
application called terminal; launch terminal by going into the 
applications toolbar, then into accessories and then click on the 
terminal icon…&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot3.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27260 aligncenter&quot; height=&quot;346&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot3.jpg&quot; title=&quot;Screenshot3&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
With terminal up and running we are going to need to enter in some 
commands. We need to move the file dpkg-scanpackages to its proper 
location within Ubuntu and to do this we are going to use terminal 
commands. If you are new to terminal this is going to be the tricky part
 for you! What terminal is is basically the backbone to your computer 
through terminal you can give your computer commands. All you are going 
to need to do is enter the commands that are shown to you below into 
terminal. The commands below are case sensitive so copy everything 
exactly as shown and replace *username* with your Ubuntu Username.&lt;br /&gt;

&lt;blockquote&gt;
sudo cp /home/username/Desktop/cydiarepo/dpkg-scanpackages /usr/bin&lt;br /&gt;

(Hit Enter)&lt;br /&gt;

sudo chmod 0777 /usr/bin/dpkg-scanpackages&lt;/blockquote&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot4.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27261 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot4.jpg&quot; title=&quot;Screenshot4&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Next we need to do the same thing for the dpkg-gettext.pl file. Enter the following commands into terminal…&lt;br /&gt;

&lt;blockquote&gt;
sudo cp /home/username/Desktop/cydiarepo/dpkg-gettext.pl /etc/perl&lt;br /&gt;

(Hit enter)&lt;br /&gt;

sudo chmod 0777 /etc/perl/dpkg-gettext.pl&lt;/blockquote&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot5.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27262 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot5.jpg&quot; title=&quot;Screenshot5&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 3) -&lt;/strong&gt;&lt;/em&gt; With the commands now entered we 
are going to check to make sure the two files ended up where they were 
supposed to go. Open up any file on your desktop and in the top left 
hand corner you should see a little pen icon. Click the pen icon and 
type in &lt;em&gt;&lt;strong&gt;/usr/bin&lt;/strong&gt;&lt;/em&gt; in the text box beside it 
(again these are case sensitive so enter it exactly as shown). You 
should see the file dpkg-scanpackages if you scroll down a little ways; 
as shown below.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot6.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27263 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot6.jpg&quot; title=&quot;Screenshot6&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
We are going to also do the same thing for the file dpkg-gettext.pl and check if it is in the right place. Type in &lt;em&gt;&lt;strong&gt;/etc/perl&lt;/strong&gt;&lt;/em&gt;
 into the text box beside the pen icon and you should see the file 
dpkg-gettext.pl. If you do not see the files in their respected 
locations then go back to terminal and make sure you enter the commands 
in correctly.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot7.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27264 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot7.jpg&quot; title=&quot;Screenshot7&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 1) -&lt;/strong&gt;&lt;/em&gt; With the two files now in place 
we are going to begin creating the file structure for our Cydia 
Repository. Create a Folder on your desktop and name it “repository”.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot8.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27265 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot8.jpg&quot; title=&quot;Screenshot8&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Inside the “repository” folder create two other folders called “uploads” and “deb_files”.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot9.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27266 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot9.jpg&quot; title=&quot;Screenshot9&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
With the folders created we are now going to place your theme or application inside the “uploads” folder.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot11.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27267 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot11.jpg&quot; title=&quot;Screenshot11&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 2) -&lt;/strong&gt;&lt;/em&gt; Now that your Application or 
Theme is placed inside the “uploads” folder we are now going to go back 
to terminal and create our .deb file.&lt;br /&gt;

Launch terminal if you closed it and enter in the following commands exactly as shown. &lt;strong&gt;**Note You must type the package name exactly as it appears on the folder that your Application or Theme is in.&lt;br /&gt;
&lt;/strong&gt;&lt;br /&gt;

&lt;blockquote&gt;
cd /home/username/Desktop/repository/uploads&lt;br /&gt;
(hit enter)&lt;br /&gt;
dpkg -b MyTheme&lt;/blockquote&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot12.png&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27274 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot12.png&quot; title=&quot;Screenshot12&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
If everything worked correctly we should now see a .deb version of 
your Application or Theme inside the “uploads” folder. **Note Ignore any
 warning messages as they are just custom fields that Cydia uses that 
aren’t being recognized by Ubuntu.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot16.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27269 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot16.jpg&quot; title=&quot;Screenshot16&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
The next thing we need to do is move our .deb file from the “uploads” folder to the “deb_files” folder.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot14.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27271 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot14.jpg&quot; title=&quot;Screenshot14&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 3) -&lt;/strong&gt;&lt;/em&gt; Now that your .deb file is in its proper place we need to create our &lt;em&gt;&lt;strong&gt;Packages&lt;/strong&gt;&lt;/em&gt;
 file. This file will contain all the data for the files that are in 
your repository so that when people add your Cydia Repository via Cydia 
it will know what packages are in your repository and how many there are
 etc. Enter the following commands into terminal…&lt;br /&gt;

&lt;blockquote&gt;
cd /home/username/Desktop/repository/&lt;br /&gt;

(Hit Enter)&lt;br /&gt;

dpkg-scanpackages -m . /dev/null &amp;gt;Packages&lt;/blockquote&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot151.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27273 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot151.jpg&quot; title=&quot;Screenshot15&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
You should now see the &lt;em&gt;&lt;strong&gt;Packages&lt;/strong&gt;&lt;/em&gt; file in your “repository” folder.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot161.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27312 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot161.jpg&quot; title=&quot;Screenshot16&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
We need to make sure the Packages file correctly linked to the 
location of your .deb file. To do this simply double click the Packages 
file and make sure you have the correct file path to your .deb file 
which should be &lt;em&gt;&lt;strong&gt;./deb/MyProgram.deb&lt;/strong&gt;&lt;/em&gt; as highlighted below. If you do not see the correct file path then simply correct this error now and then save the file.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot17.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27313  aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot17.jpg&quot; title=&quot;Screenshot17&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 7) -&lt;/strong&gt;&lt;/em&gt; The Next thing we need to do is archive the &lt;em&gt;&lt;strong&gt;Packages&lt;/strong&gt;&lt;/em&gt; file that we just created and turn it into a &lt;em&gt;&lt;strong&gt;.bz2&lt;/strong&gt;&lt;/em&gt; file. To do this right click on the &lt;em&gt;&lt;strong&gt;Packages&lt;/strong&gt;&lt;/em&gt; file and hit the &lt;em&gt;&lt;strong&gt;Compress Button&lt;/strong&gt;&lt;/em&gt;. We want to change the extension to &lt;em&gt;&lt;strong&gt;.bz2&lt;/strong&gt;&lt;/em&gt; and once this option is selected hit the &lt;em&gt;&lt;strong&gt;Compress Button&lt;/strong&gt;&lt;/em&gt; now.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot18.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27314 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot18.jpg&quot; title=&quot;Screenshot18&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
We should now have the following files in our “repository” folder shown below.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot19.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27315 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot19.jpg&quot; title=&quot;Screenshot19&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;em&gt;&lt;strong&gt;Step 4) – &lt;/strong&gt;&lt;/em&gt;The last file that we need to create that is required is the &lt;em&gt;&lt;strong&gt;Release&lt;/strong&gt;&lt;/em&gt;
 file; this file contains the metadata of your repository. Right click 
and create a new file inside your “repository” folder and name the file &lt;em&gt;&lt;strong&gt;Release&lt;/strong&gt;&lt;/em&gt;. Double click the file and enter in the following information:&lt;br /&gt;

&lt;blockquote&gt;
&lt;em&gt;Origin&lt;/em&gt;: a slightly longer version of your repository name.&lt;br /&gt;
&lt;em&gt;Label&lt;/em&gt;: a shorter version of repository name.&lt;br /&gt;
&lt;em&gt;Suite&lt;/em&gt;: this line should always be left as “stable”.&lt;br /&gt;
&lt;em&gt;Version&lt;/em&gt;: your repositories version number.&lt;br /&gt;
&lt;em&gt;Codename&lt;/em&gt;: you can put whatever you want here.&lt;br /&gt;
&lt;em&gt;Architectures&lt;/em&gt;: this should always be left as “iphoneos-arm”.&lt;br /&gt;
&lt;em&gt;Components&lt;/em&gt;: this should always be left as “main”.&lt;br /&gt;
&lt;em&gt;Description&lt;/em&gt;: a short description of the repository goes here.&lt;/blockquote&gt;
With the information now entered it should look something like the screenshot below…&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Capture2.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27317 aligncenter&quot; height=&quot;381&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Capture2.jpg&quot; title=&quot;Capture2&quot; width=&quot;493&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
You should now have 3 files “Packages,Packages.bz2 and Release” and 2
 folders “uploads and deb_files” in your “repository” folder.&lt;br /&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot20.jpg&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-27316 aligncenter&quot; height=&quot;360&quot; src=&quot;http://www.ijailbreak.com/wp-content/uploads/2010/12/Screenshot20.jpg&quot; title=&quot;Screenshot20&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Now that we have all the files needed for our repository we are going
 to upload the “repository” folder to our host using an ftp program of 
your choice. Once your “repository” folder is upload to your host then 
you can add it through Cydia. To do this simply go into the &lt;em&gt;&lt;strong&gt;Manage Tab&lt;/strong&gt;&lt;/em&gt; &amp;gt; &lt;em&gt;&lt;strong&gt;Sources&lt;/strong&gt;&lt;/em&gt; &amp;gt; &lt;em&gt;&lt;strong&gt;Edit&lt;/strong&gt;&lt;/em&gt; &amp;gt; &lt;em&gt;&lt;strong&gt;Add&lt;/strong&gt;&lt;/em&gt; and then type in the &lt;em&gt;&lt;strong&gt;URL&lt;/strong&gt;&lt;/em&gt;
 of your Repository and wait for cydia to add your source. 
Congratulations if you get success and everything works you have now 
created a Cydia Repository. If you want to add more Applications or 
Themes to your Repository simply repeat the steps add more packages. If 
you did not get success post your questions/comments in the comments 
section below, and I will personally help you out.&lt;br /&gt;

Don’t forget to add “iJailbreak’s Repository!” – &lt;a href=&quot;http://www.ijailbreak.com/cydia/introducing-the-official-ijailbreak-repository/&quot;&gt;click here&lt;/a&gt;.&lt;br /&gt;

&lt;strong&gt;P.S.&lt;/strong&gt; If you are interested in developing custom depiction page, &lt;a href=&quot;http://iwebkit.net/&quot; target=&quot;_self&quot;&gt;this is a great framework&lt;/a&gt; to get you started.&lt;br /&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/262388455500325232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/creating-cydia-repositorysource-for-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/262388455500325232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/262388455500325232'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/creating-cydia-repositorysource-for-ios.html' title='Creating A Cydia Repository/Source For iOS! [Covering Everything A-Z]'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-836554580261024135</id><published>2012-04-25T15:07:00.003+07:00</published><updated>2012-04-25T15:07:18.940+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Cocoa: Binding. GUI application without outlets</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5746817465743449305&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; position: relative; width: 686px;&quot;&gt;
Outlet in Cocoa is a persistent reference to a GUI control. For example, it is a common way to create the outlet to the text field and change the text in this field via the outlet. Now, in 64-bit Xcode, you add a property with IBOutlet keyword, synthesize it, and set new text via that property:&lt;br /&gt;&lt;br /&gt;1. In interface declaration:&lt;br /&gt;&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@property&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #ba11a2;&quot;&gt;retain&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #ba11a2;&quot;&gt;IBOutlet&lt;/span&gt;&amp;nbsp;NSTextField * text;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;2. In the implementation section:&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@synthesize&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;text;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
3. Set new text to the text field:&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #4f8187;&quot;&gt;text&lt;/span&gt;.stringValue = @&quot;Hello, World!&quot;;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;4. Get value:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #7033a9;&quot;&gt;NSString&lt;/span&gt;* str =&amp;nbsp;&lt;span style=&quot;color: #4f8187;&quot;&gt;text&lt;/span&gt;.stringValue;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;Same can be done without coding. Sometimes it can be needed and interesting. Let&#39;s make a test application:&lt;br /&gt;1. Create new Mac OS X Cocoa project in Xcode:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHEhwhZzY_D7zsLahZOKZsH_GblTdZbTWHKEgImvqtj36sqHZC6PAWZrIbonx4Gizplb4q7EhNDgvEPpWojZtW5PTU1P92tBg3iF3WI_k-m7LBbRJr0BEQE10HPTN6-J0v5JLYa9TztRM/s1600/New+Project-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;259&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHEhwhZzY_D7zsLahZOKZsH_GblTdZbTWHKEgImvqtj36sqHZC6PAWZrIbonx4Gizplb4q7EhNDgvEPpWojZtW5PTU1P92tBg3iF3WI_k-m7LBbRJr0BEQE10HPTN6-J0v5JLYa9TztRM/s320/New+Project-1.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWi5D7_TIfuwyn-wjXplp-gys3BWYqHoXQUstcawHsBOWcvDS0saFWF5LUDryeJO0OZXZuexLlDfV4Vs4rR0p8UotUGuPcJ7r203ex5nrqLmeSRxe8oYdYmTWbtr8won4RA8GzNNeMyOw/s1600/Xcode.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;259&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWi5D7_TIfuwyn-wjXplp-gys3BWYqHoXQUstcawHsBOWcvDS0saFWF5LUDryeJO0OZXZuexLlDfV4Vs4rR0p8UotUGuPcJ7r203ex5nrqLmeSRxe8oYdYmTWbtr8won4RA8GzNNeMyOw/s320/Xcode.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I named the project as TextNoOutlet (shown on the screenshots above).&lt;br /&gt;2. In the application delegate class we add a string property:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkya7yggtb661j2pPFOk2SRDCebis2v27jg14k435CkI0h9bRkpg8gwHRPio35Ob7Y8vYA_AU7_8-fqkXG0MKxtG4v5OJbqc4n8PifpOFn41FqGLtDSoJVhzEIP_z62Te6L0f1hW9HmXE/s1600/TextNoOutletAppDelegate.h+-+TextNoOutlet.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkya7yggtb661j2pPFOk2SRDCebis2v27jg14k435CkI0h9bRkpg8gwHRPio35Ob7Y8vYA_AU7_8-fqkXG0MKxtG4v5OJbqc4n8PifpOFn41FqGLtDSoJVhzEIP_z62Te6L0f1hW9HmXE/s320/TextNoOutletAppDelegate.h+-+TextNoOutlet.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;Initially the application delegate class declared as (TextNoOutletAppDelegate.h file):&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color: #d1241d; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #78482b;&quot;&gt;#import&lt;/span&gt;&lt;cocoa cocoa.h=&quot;&quot;&gt;&lt;/cocoa&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@interface&lt;/span&gt;&amp;nbsp;TextNoOutletAppDelegate : NSObject&amp;nbsp;&lt;nsapplicationdelegate&gt;{&lt;/nsapplicationdelegate&gt;&lt;/div&gt;
&lt;div style=&quot;color: #7033a9; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;NSWindow&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;span style=&quot;color: #4f8187;&quot;&gt;window&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@property&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&lt;/span&gt;assign&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;&lt;/span&gt;IBOutlet&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;NSWindow *window;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@end&lt;/div&gt;
&lt;br /&gt;Replace it for:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color: #d1241d; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #78482b;&quot;&gt;#import&lt;/span&gt;&lt;cocoa cocoa.h=&quot;&quot;&gt;&lt;/cocoa&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@interface&lt;/span&gt;&amp;nbsp;TextNoOutletAppDelegate : NSObject&lt;nsapplicationdelegate&gt;&lt;/nsapplicationdelegate&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@property&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&lt;/span&gt;assign&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;&lt;/span&gt;IBOutlet&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;NSWindow *window;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@property&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #ba11a2;&quot;&gt;copy&lt;/span&gt;) NSString *text;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@end&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;Control-S to save the header file. Alt-Cmd-Up to switch to the m-file. Synthesize the property:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color: #d1241d; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #78482b;&quot;&gt;#import&amp;nbsp;&lt;/span&gt;&quot;TextNoOutletAppDelegate.h&quot;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@implementation&lt;/span&gt;&amp;nbsp;TextNoOutletAppDelegate&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@synthesize&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;window;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;b&gt;@synthesize&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&amp;nbsp;text;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
- (&lt;span style=&quot;color: #ba11a2;&quot;&gt;void&lt;/span&gt;)applicationDidFinishLaunching:(&lt;span style=&quot;color: #7033a9;&quot;&gt;NSNotification&lt;/span&gt;&amp;nbsp;*)aNotification {&lt;/div&gt;
&lt;div style=&quot;color: #008700; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Insert code here to initialize your application&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@end&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;Here I added only one line shown in bold. Control-S here to save the modification.&lt;br /&gt;&lt;br /&gt;3. In Interface Builder (click twice on the MainWindow.xib file) will put the Text Field on the prototype window. Let&#39;s put Label under this text field. Arrange the size and locations.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQLKVHjqUvkqZ48SL-VFfHJfiQABnFC5CeXzms21b7NhA141tpFJfp7kxDPiBNk8WNG3LHGxKudSko1jlN6riDtmX01drZlTxWnqIG-wIgsLvMpEgQFlHKlgiVJVN2w2XMryW_y-KPs1M/s1600/Library.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQLKVHjqUvkqZ48SL-VFfHJfiQABnFC5CeXzms21b7NhA141tpFJfp7kxDPiBNk8WNG3LHGxKudSko1jlN6riDtmX01drZlTxWnqIG-wIgsLvMpEgQFlHKlgiVJVN2w2XMryW_y-KPs1M/s320/Library.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;4. The binding.&lt;br /&gt;Select the text field in the prototype window. Press Command-4 to open the Binding Inspector:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipWhh5PALKzfCOjYNuJk9ePRXlrxUTiRRBAy3dSebbNe6vvZcTIFv-EixJDzJ59b4u6xICHBnEPjvHpy93sozYhRu9_SNvtVaEt_SoL7d7hMBdmz-Cb7NyrLenvvTMSb5kt0xxsdj3_2U/s1600/Text+Field+Bindings.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipWhh5PALKzfCOjYNuJk9ePRXlrxUTiRRBAy3dSebbNe6vvZcTIFv-EixJDzJ59b4u6xICHBnEPjvHpy93sozYhRu9_SNvtVaEt_SoL7d7hMBdmz-Cb7NyrLenvvTMSb5kt0xxsdj3_2U/s320/Text+Field+Bindings.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;In the Value section check the checkbox and set &quot;text&quot; in the Modal Key Path field.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJB9C1axS-1wpyMJ_o-tIxYcRfMVPlIZicOghb8PSdxd1wAE3k898OZBY4sK_n8c2d6aNuCrCaLiU89lBclb1vW0yxgzkk195ca0up9wEbg0jm5azHz7ZtbZBXHxB1ODFADGlK9qVIfnU/s1600/Text+Field+Bindings-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJB9C1axS-1wpyMJ_o-tIxYcRfMVPlIZicOghb8PSdxd1wAE3k898OZBY4sK_n8c2d6aNuCrCaLiU89lBclb1vW0yxgzkk195ca0up9wEbg0jm5azHz7ZtbZBXHxB1ODFADGlK9qVIfnU/s320/Text+Field+Bindings-1.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;Select the label. Command-3 to switch to the Binding Inspector. Check the checkbox and modify the Modal Key Path in the same way as for the text field.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5uwwCnA1sCcmFAvGyDDkRKlqcnRhNBM9XlpIxFkb9YgA-WKjLxf-IrhKGWiXAbmDfFK2w8hcCum2WOeIQedW340GD_MmY3sOycQQsjyBANT6E4NRFV0wy5rv7CiOeEmUHE4W9rDKNCAg/s1600/Text+Field+Bindings-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5uwwCnA1sCcmFAvGyDDkRKlqcnRhNBM9XlpIxFkb9YgA-WKjLxf-IrhKGWiXAbmDfFK2w8hcCum2WOeIQedW340GD_MmY3sOycQQsjyBANT6E4NRFV0wy5rv7CiOeEmUHE4W9rDKNCAg/s320/Text+Field+Bindings-2.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;Save your work in Interface Builder (Control-S or Save in the File menu).&lt;br /&gt;5. Build and Run the program:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFbj0Slc0qPRdV-jYheI6T3oIu3p3WKcrSrRm4qCDHl5JSuB4thxzDInNeYW3hPSNZjYHYdjcG0mvgzryBi4Bn86wWvKRhp016HK9IobHmP1XOr5PmdCylf4YEyRrePXjL6W9OERBFLj4/s1600/TextNoOutlet.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;81&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFbj0Slc0qPRdV-jYheI6T3oIu3p3WKcrSrRm4qCDHl5JSuB4thxzDInNeYW3hPSNZjYHYdjcG0mvgzryBi4Bn86wWvKRhp016HK9IobHmP1XOr5PmdCylf4YEyRrePXjL6W9OERBFLj4/s320/TextNoOutlet.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;Try to type a text in the text field, press Enter and see the text reflected in the label.&lt;br /&gt;&lt;br /&gt;Let&#39;s apply the binding to the application window:&lt;br /&gt;In Interface Builder select the window object in the Document window, press Command-4 to switch to the Binding Inspector and bind the title of the window in the same way as the label before:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5YMkwSGqui6_zTDvbv23JJL8hc4QEWZHZkr1EFEXhK3E6lN3k8yMa7lpUD-qHTHRbJWrzE03XpkhzerRm1SxLMI-Y3eyjN_qdFcvirzLZAxA1AmnH2RB0ralEgR0gY_XVStI36T5BzfM/s1600/Window+Bindings.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;284&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5YMkwSGqui6_zTDvbv23JJL8hc4QEWZHZkr1EFEXhK3E6lN3k8yMa7lpUD-qHTHRbJWrzE03XpkhzerRm1SxLMI-Y3eyjN_qdFcvirzLZAxA1AmnH2RB0ralEgR0gY_XVStI36T5BzfM/s320/Window+Bindings.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;Save the change and Build and Run the program:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_AGNrl7PkRoUsQeQdaiyONTkYVENAKj5pcILDiHQa1TCSYHF4avD4KMMtlamofFTNvmKcEuRYDGwuPbGnRsDrtoFIf2k2jBmht1d58vkWS9bduvdlh1xIc5E6Tq2l_SxCyeazH075GfU/s1600/Untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_AGNrl7PkRoUsQeQdaiyONTkYVENAKj5pcILDiHQa1TCSYHF4avD4KMMtlamofFTNvmKcEuRYDGwuPbGnRsDrtoFIf2k2jBmht1d58vkWS9bduvdlh1xIc5E6Tq2l_SxCyeazH075GfU/s320/Untitled.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7JMnqV1yKUlkuHa8EBS2Fph5nm5QwjD6QLgiMGUGvJ1NGCpgxV93fWZ4BMcw2VYRuhvQZL9v9Nlx5HbNCcIdYGvyN2-LCrtKZiKCCTzYVw7npTL9pQq-zESkMz0td0oCTMxIf8mOprDk/s1600/Hello.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7JMnqV1yKUlkuHa8EBS2Fph5nm5QwjD6QLgiMGUGvJ1NGCpgxV93fWZ4BMcw2VYRuhvQZL9v9Nlx5HbNCcIdYGvyN2-LCrtKZiKCCTzYVw7npTL9pQq-zESkMz0td0oCTMxIf8mOprDk/s320/Hello.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;I&#39;d Like to show one more interesting example with the slider control. &amp;nbsp;Same principle: we will add a property, for example value to the application delegate class and bind it with the slider control and a label. The property added to the application delegate is shown in the bold:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color: #d1241d; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #78482b;&quot;&gt;#import&lt;/span&gt;&lt;cocoa cocoa.h=&quot;&quot;&gt;&lt;/cocoa&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@interface&lt;/span&gt;&amp;nbsp;TextNoOutletAppDelegate : NSObject&lt;nsapplicationdelegate&gt;&lt;/nsapplicationdelegate&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@property&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&lt;/span&gt;assign&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;&lt;/span&gt;IBOutlet&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;NSWindow *window;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@property&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #ba11a2;&quot;&gt;copy&lt;/span&gt;) NSString *text;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;&lt;b&gt;@property&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&amp;nbsp;(&lt;/b&gt;&lt;span style=&quot;color: #ba11a2;&quot;&gt;&lt;b&gt;assign&lt;/b&gt;&lt;/span&gt;&lt;b&gt;) NSInteger value;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@end&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;It should be synthesized in the implementation file:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color: #d1241d; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #78482b;&quot;&gt;#import&amp;nbsp;&lt;/span&gt;&quot;TextNoOutletAppDelegate.h&quot;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #ba11a2;&quot;&gt;@implementation&lt;/span&gt;&amp;nbsp;TextNoOutletAppDelegate&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@synthesize&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;window;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@synthesize&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;text;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;@synthesize&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;&amp;nbsp;value;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
- (&lt;span style=&quot;color: #ba11a2;&quot;&gt;void&lt;/span&gt;)applicationDidFinishLaunching:(&lt;span style=&quot;color: #7033a9;&quot;&gt;NSNotification&lt;/span&gt;&amp;nbsp;*)aNotification {&lt;/div&gt;
&lt;div style=&quot;color: #008700; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// Insert code here to initialize your application&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #ba11a2; font: normal normal normal 14px/normal Menlo; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
@end&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;In Interface Builder I add the slider and one more Label. Then I bind the slider with &quot;value&quot; property:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie-heZTmRD-pxceJQjwvTAxeDr6qU46gdkfcB7i9gdnRvEC13Pr5oz4KPRInZCSDh9tWCFZHx_-8sHOrx5LZQxMbeFwjAeJtu8dRJjEWVdF1I2NKYs13ofjqKm5eqLf0-ujkp6WapQc3A/s1600/Slider+Bindings.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie-heZTmRD-pxceJQjwvTAxeDr6qU46gdkfcB7i9gdnRvEC13Pr5oz4KPRInZCSDh9tWCFZHx_-8sHOrx5LZQxMbeFwjAeJtu8dRJjEWVdF1I2NKYs13ofjqKm5eqLf0-ujkp6WapQc3A/s320/Slider+Bindings.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
I&#39;d like to set &quot;Continuos&quot; for the slider control:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqhhFe1WLjy1p6j6C12l04bH11I3bHIjqrbE0-VpvqHgwl1vRrQh8PuGfdBWGFC2Jf9k7PQ5k5D_JBMJr8LsMLN1VCh4890JkToejS_M2vItJL9mx7CB3gLz_Poc8EiCjSy9ICwnTjUKk/s1600/Slider+Attributes.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqhhFe1WLjy1p6j6C12l04bH11I3bHIjqrbE0-VpvqHgwl1vRrQh8PuGfdBWGFC2Jf9k7PQ5k5D_JBMJr8LsMLN1VCh4890JkToejS_M2vItJL9mx7CB3gLz_Poc8EiCjSy9ICwnTjUKk/s320/Slider+Attributes.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;Now I select the new label in the prototype window and will bind it in a bit different way - via &quot;Value with Pattern&quot;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX4AvnhnV6pdyJs2o_3DBkC42-arO_iBV_JrTWMWmwQYvZQvyq8LPtRCBjIQwqKXYLQdey0inRF5SoVbgp2GDdz4DDpFocQNhBFY_8ERGPu7VTsMINfOWN7mBILSlBa5yEWhpKDq42dPI/s1600/Text+Field+Bindings-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX4AvnhnV6pdyJs2o_3DBkC42-arO_iBV_JrTWMWmwQYvZQvyq8LPtRCBjIQwqKXYLQdey0inRF5SoVbgp2GDdz4DDpFocQNhBFY_8ERGPu7VTsMINfOWN7mBILSlBa5yEWhpKDq42dPI/s320/Text+Field+Bindings-3.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;Save my work, switch to Xcode and Build and Run my program:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSQUcZwjda9H0Z6L1eIqBfSnbyyNIS-30icwdnhYy6L94TH9gN28Vttrm2PMpe4985HJXuzhzK0K0tu0mJpcxcQVD0EN46XozYMB1C2JUbCyKlZyaz6IxdNOU2cmuZ9DKP45ZwM2AyTAw/s1600/Untitled-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;143&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSQUcZwjda9H0Z6L1eIqBfSnbyyNIS-30icwdnhYy6L94TH9gN28Vttrm2PMpe4985HJXuzhzK0K0tu0mJpcxcQVD0EN46XozYMB1C2JUbCyKlZyaz6IxdNOU2cmuZ9DKP45ZwM2AyTAw/s320/Untitled-1.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;This &quot;simplification&quot; of the GUI work (do not use outlet for a GUI control and connect many GUI controls to the same property) is possible because of the nice feature of Objective-C 2.0 -&amp;nbsp;&lt;b&gt;Key-Value Coding&lt;/b&gt;&amp;nbsp;or&amp;nbsp;&lt;b&gt;KVC&lt;/b&gt;. It is a simple protocol allowing to set and get values indirectly. In the first example, that uses the outlet, I call a method to get or to set values to/from the text field. Then, in the next examples, I specify a key that is used by Cocoa to figure out which property match up to this key: the property text was added to the application delegate class and key &#39;text&#39; was used to bind the GUI controls with the application delegate.&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/836554580261024135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-binding-gui-application-without.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/836554580261024135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/836554580261024135'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-binding-gui-application-without.html' title='Cocoa: Binding. GUI application without outlets'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHEhwhZzY_D7zsLahZOKZsH_GblTdZbTWHKEgImvqtj36sqHZC6PAWZrIbonx4Gizplb4q7EhNDgvEPpWojZtW5PTU1P92tBg3iF3WI_k-m7LBbRJr0BEQE10HPTN6-J0v5JLYa9TztRM/s72-c/New+Project-1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-3262445320990113251</id><published>2012-04-25T15:06:00.002+07:00</published><updated>2012-04-25T15:06:27.396+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Cocoa: show Alert</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Show Alert in a Cocoa application:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
- (&lt;span style=&quot;color: #ba11a2;&quot;&gt;IBAction&lt;/span&gt;)showAlert:(&lt;span style=&quot;color: #ba11a2;&quot;&gt;id&lt;/span&gt;)sender&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #d1241d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7033a9;&quot;&gt;NSString&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*question =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #78482b;&quot;&gt;NSLocalizedString&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;Do you see this alert?&quot;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d1241d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;@&quot;Let&#39;s verify that I see this question&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d1241d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7033a9;&quot;&gt;NSString&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*info =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #78482b;&quot;&gt;NSLocalizedString&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;I hope, I see this alert&quot;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d1241d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;@&quot;Here is an info&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7033a9;&quot;&gt;NSString&lt;/span&gt;&amp;nbsp;*cancelButton =&amp;nbsp;&lt;span style=&quot;color: #78482b;&quot;&gt;NSLocalizedString&lt;/span&gt;(&lt;span style=&quot;color: #d1241d;&quot;&gt;@&quot;Cancel&quot;&lt;/span&gt;,&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #d1241d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;@&quot;Cancel button title&quot;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7033a9;&quot;&gt;NSAlert&lt;/span&gt;&amp;nbsp;*alert = [[&lt;span style=&quot;color: #7033a9;&quot;&gt;NSAlert&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #3d0f81;&quot;&gt;alloc&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #3d0f81;&quot;&gt;init&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[alert&amp;nbsp;&lt;span style=&quot;color: #3d0f81;&quot;&gt;setMessageText&lt;/span&gt;:question];&lt;/div&gt;
&lt;div style=&quot;color: #3d0f81; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[alert&amp;nbsp;&lt;/span&gt;setInformativeText&lt;span style=&quot;color: black;&quot;&gt;:info];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[alert&amp;nbsp;&lt;span style=&quot;color: #3d0f81;&quot;&gt;addButtonWithTitle&lt;/span&gt;:cancelButton];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 16px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7033a9;&quot;&gt;NSInteger&lt;/span&gt;&amp;nbsp;answer = [alert&amp;nbsp;&lt;span style=&quot;color: #3d0f81;&quot;&gt;runModal&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[alert&amp;nbsp;&lt;span style=&quot;color: #3d0f81;&quot;&gt;release&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;alert =&amp;nbsp;&lt;span style=&quot;color: #ba11a2;&quot;&gt;nil&lt;/span&gt;;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/3262445320990113251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-show-alert.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3262445320990113251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3262445320990113251'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-show-alert.html' title='Cocoa: show Alert'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4504547728234461504</id><published>2012-04-25T15:05:00.002+07:00</published><updated>2012-04-25T15:05:34.294+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Cocoa: NSScanner</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;sscanf is a standard C function. We use it so rarely, but it exists and can be the fastest method to parse a string. In order to remind I post this short program that uses sscanf to retrieve two float number from a string:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;include &lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #40015a;&quot;&gt;stdio.h&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;float&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; y&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; string &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;3.1415 6.28&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    sscanf&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;string&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%f&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%f&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    printf&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;x = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%.4f&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;, y = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%.2f&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfUyiYaSw0MnCG4ZEcGEVT8mcxQMEBjUkqzAxjtaVBj5ue-MaBXUNBnbiHpKPZsQRLEWMyA7EL90r7U3hTXQUjaIn-Em19Qsi4QZ6_KJ15zPyLaHdDef6tySEWF8crwvr4yxSo5xUbKQ/s1600/main.c+-+GDB.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;257&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfUyiYaSw0MnCG4ZEcGEVT8mcxQMEBjUkqzAxjtaVBj5ue-MaBXUNBnbiHpKPZsQRLEWMyA7EL90r7U3hTXQUjaIn-Em19Qsi4QZ6_KJ15zPyLaHdDef6tySEWF8crwvr4yxSo5xUbKQ/s320/main.c+-+GDB.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;How to parse this string in Objective-C?&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Firstly, this is Objective-C, so the same code will work:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #004a43;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;include &lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #40015a;&quot;&gt;stdio.h&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSAutoreleasePool &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; pool &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSAutoreleasePool alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;float&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;y&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; string &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;3.1415 6.28&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    sscanf&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;string&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%f&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%f&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;x = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%.4f&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;, y = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%.2f&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pool drain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw_xKb2rP4OJStaIkR9nB6Y9FdPZMUmOjIsnQRxXPWjmGrff52kaAHG1nohRAxs5efw2b0RJ0nPnXCT98X7DDAItelbmk9BcQCLxH9pcHdyBfN2Lc1hNWOMyQWACqF5AEBNYzt8MBwDTI/s1600/SscanfInObjective-C.m+-+GDB.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw_xKb2rP4OJStaIkR9nB6Y9FdPZMUmOjIsnQRxXPWjmGrff52kaAHG1nohRAxs5efw2b0RJ0nPnXCT98X7DDAItelbmk9BcQCLxH9pcHdyBfN2Lc1hNWOMyQWACqF5AEBNYzt8MBwDTI/s320/SscanfInObjective-C.m+-+GDB.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Secondly, this is Objectve-C. So there is a special class NSScanner that does the work.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSAutoreleasePool &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; pool &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSAutoreleasePool alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;float&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; y&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; str &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;3.1415 6.28&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSScanner&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; scanner &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSScanner scannerWithString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;str&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanFloat&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanFloat&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;y&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;x = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%.4f&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;, y = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%.2f&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pool drain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEp5BE4o3Y8n9wTyYYuBze0w7jU5oLpQwsXW7WSSyC3ngm5p0VRsj9MXgFyoqk68JoTR_-Ug94umBGGpEjSCdHqPCZ-INzEBPz3oOuX6n04kCqFUmDEmmot67YoR93AlYdMkH2HR8hII4/s1600/NSScannerTest.m+-+GDB.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEp5BE4o3Y8n9wTyYYuBze0w7jU5oLpQwsXW7WSSyC3ngm5p0VRsj9MXgFyoqk68JoTR_-Ug94umBGGpEjSCdHqPCZ-INzEBPz3oOuX6n04kCqFUmDEmmot67YoR93AlYdMkH2HR8hII4/s320/NSScannerTest.m+-+GDB.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Let&#39;s make a more complicated example. The following program will create a text file and save three basic graphical structures in it: NSPoint, NSSize and NSRect.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSAutoreleasePool &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; pool &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSAutoreleasePool alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; fileName &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;coordinate.txt&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSError&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; err &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; nil&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    NSPoint point&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSSize size&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSRect rect&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Write NSPoint, NSSize and NSRect to file.&lt;/span&gt;
    point &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSMakePoint&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;3.1415&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;6.28&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    size &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSMakeSize&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;14&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    rect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSMakeRect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; outString &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSString&amp;nbsp;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;stringWithFormat&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;point = %@; size = %@; rectangle = %@;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;/span&gt;      NSStringFromPoint&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;point&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSStringFromSize&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSStringFromRect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;rect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;outString writeToFile&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; fileName&amp;nbsp;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;atomically&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; NO encoding&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; NSASCIIStringEncoding error&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;err&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pool drain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The output file looks so:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaf4qoJnqFPqKE4QYKQHH1Ht1OHaOx6auifpBR6GJ_jC5UIlRbhKyVq9q9GHwOxvkMH31mz2lbv0hdRmP-EWEdu042VMVbHNq6gczExpZqQl1sOfeJkq4GKzs7qLCUhOOO5OGanr3mgTw/s1600/coordinate.txt.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaf4qoJnqFPqKE4QYKQHH1Ht1OHaOx6auifpBR6GJ_jC5UIlRbhKyVq9q9GHwOxvkMH31mz2lbv0hdRmP-EWEdu042VMVbHNq6gczExpZqQl1sOfeJkq4GKzs7qLCUhOOO5OGanr3mgTw/s320/coordinate.txt.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Of course, this file can be parsed in the standard C with the simple sscanf. The next Objective-C program does it with NSScanner class:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSAutoreleasePool &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; pool &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSAutoreleasePool alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; fileName &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;coordinate.txt&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSError&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; err &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; nil&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    NSPoint point&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSSize size&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSRect rect&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    NSStringEncoding encoding&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; inString &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSString stringWithContentsOfFile&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; fileName 
                                               usedEncoding&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;encoding 
                                                      error&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;err&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; strPoint &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;point =&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; strSize &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;size =&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; strRect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;rectangle =&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; err &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; nil &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;inString length&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; str&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            NSScanner&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; scanner &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSScanner scannerWithString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; inString&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt; scanner scanString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; strPoint intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #7d0045;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanUpToString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;str&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #7d0045;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                point &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSPointFromString&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; str &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
            
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; strSize intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #7d0045;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanUpToString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;&amp;amp;&lt;/span&gt;str&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #7d0045;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                size &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSSizeFromString&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; str &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
            
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;strRect intoString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #7d0045;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                str &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;inString substringFromIndex&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;scanner scanLocation&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                rect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSRectFromString&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; str &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
            
            NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;point = %@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSStringFromPoint&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; point &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;size = %@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSStringFromSize&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; size &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;rectangle = %@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSStringFromRect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; rect &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pool drain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Program output:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
Program loaded.&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
&lt;b&gt;run&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
[Switching to process 57339]&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
Running…&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
&lt;b&gt;2010-07-18 21:48:24.201 CoordinatesToString[57339:a0f] point = {3.1415, 6.28}&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
&lt;b&gt;2010-07-18 21:48:24.205 CoordinatesToString[57339:a0f] size = {2, 14}&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 28px; margin-right: 0px; margin-top: 0px; text-indent: -28px;&quot;&gt;
&lt;b&gt;2010-07-18 21:48:24.206 CoordinatesToString[57339:a0f] rectangle = {{10, 10}, {200, 100}}&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Mac OS X Reference Library:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSScanner_Class/Reference/Reference.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;NSScanner Class Reference&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Strings/Articles/Scanners.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;String Programming Guide. Scanners.&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4504547728234461504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-nsscanner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4504547728234461504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4504547728234461504'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-nsscanner.html' title='Cocoa: NSScanner'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbfUyiYaSw0MnCG4ZEcGEVT8mcxQMEBjUkqzAxjtaVBj5ue-MaBXUNBnbiHpKPZsQRLEWMyA7EL90r7U3hTXQUjaIn-Em19Qsi4QZ6_KJ15zPyLaHdDef6tySEWF8crwvr4yxSo5xUbKQ/s72-c/main.c+-+GDB.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4810640843776577019</id><published>2012-04-25T15:04:00.007+07:00</published><updated>2012-04-25T15:04:56.915+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Template program to learn Cocoa graphics</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The standard way to learn new programming language is very boring for me - endless reading of heavy books, typing useless programs that calculates factorials,... Since my student times, since GWBASIC I begin from the graphics, simple graphic, rectangles, circles - the graphic primitives. When I know how to draw them, I can go on and learn the basic language constructions, language semantic and programming techniques.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;This way works for me in my Cocoa period. In this post I&#39;d like to show two methods to create a template project that allows to learn the Cocoa graphical primitives. This template can grow in your hands and become a real Cocoa (or Coco Touch) application.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;As any Cocoa application this application has a main window and a view inside. That&#39;s all. First method uses Interface Builder. The second one fully ignores the Interface Builder.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Method with Interface Builder&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;1. Create new project in Xcode from the Cocoa Application template, add new Objective-C class derived from NSView, give a name to this class, for example DrawingView.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;2. Launch Interface Builder by pressing on the MainMenu.xib file. Find &quot;custom view&quot; in the Library, drag and drop it onto the application window. Set the view size - almost the whole window. In the Size Inspector (Cmd+3) set the autosizing options. In the Identity Inspector (Cmd+6) set the view name as DrawingView. Save the project (Ctrl+S).&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;3. Switch to Xcode and open DrawingView.m file. In -drawRect method we can add our drawing code. For example:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;drawRect&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSRect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;dirtyRect &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Drawing code here.&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSGraphicsContext saveGraphicsState&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    NSRect rect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSInsetRect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self bounds&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;5&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSColor blueColor&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; set&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSRectFill&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; rect &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSGraphicsContext restoreGraphicsState&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The application runs:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2mHJ7FMMSJ0T_taG0AUzmXDlkyACPlgfxeAYMtGg4euXzZfdoKaopJW5cVmq73IFnE6qFDxOdoDBtCREyHg2OmxM2qUWrW-k7RpfzVFw1ylLBc4mJ0i3ZCq9XGBoZqyhdpkjbI6GGGw/s1600/Simple.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2mHJ7FMMSJ0T_taG0AUzmXDlkyACPlgfxeAYMtGg4euXzZfdoKaopJW5cVmq73IFnE6qFDxOdoDBtCREyHg2OmxM2qUWrW-k7RpfzVFw1ylLBc4mJ0i3ZCq9XGBoZqyhdpkjbI6GGGw/s200/Simple.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Method without Interface Builder.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;1. The first item is the same - create new project in Xcode from the Cocoa Application template, add new Objective-C class derived from NSView.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;2. Open the implementation of the application delegate class (&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;application name=&quot;&quot;&gt;AppDelegate.m) and create the view object in the launching method:&lt;/application&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;applicationDidFinishLaunching&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSNotification &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;aNotification &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Insert code here to initialize your application &lt;/span&gt;
    DrawingView &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;view &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;DrawingView alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; 
                         initWithFrame&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;window&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;contentView bounds&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;window&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;contentView addSubview&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; view&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;view setAutoresizingMask&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; NSViewWidthSizable &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt; NSViewHeightSizable&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;view release&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;3. Open the view implementation class and add the drawing code.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Launch the application.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4810640843776577019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/template-program-to-learn-cocoa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4810640843776577019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4810640843776577019'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/template-program-to-learn-cocoa.html' title='Template program to learn Cocoa graphics'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2mHJ7FMMSJ0T_taG0AUzmXDlkyACPlgfxeAYMtGg4euXzZfdoKaopJW5cVmq73IFnE6qFDxOdoDBtCREyHg2OmxM2qUWrW-k7RpfzVFw1ylLBc4mJ0i3ZCq9XGBoZqyhdpkjbI6GGGw/s72-c/Simple.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-3543463987696553435</id><published>2012-04-25T15:04:00.003+07:00</published><updated>2012-04-25T15:04:29.239+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Cocoa: Implicit Animation</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-2357014553700082067&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; position: relative; width: 686px;&quot;&gt;
This program will help to begin with the Core Animation.&lt;br /&gt;1. In Xcode create Max OS X Cocoa Application.&lt;br /&gt;2. In the Application delegate implementation file (automatically created by Xcode on Snow Leopard) add a button to the content view:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;applicationDidFinishLaunching&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSNotification &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;aNotification 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Create new button in content view.&lt;/span&gt;
    NSRect frame &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSMakeRect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;40&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;90&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;40&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSButton&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; pushButton &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSButton alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; initWithFrame&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; frame&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    pushButton&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;bezelStyle &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSRoundedBezelStyle&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pushButton setTitle&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Move&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;window&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;contentView addSubview&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; pushButton&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Set the button target and action.&lt;/span&gt;
    pushButton&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;target &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; self&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    pushButton&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;action &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;selector&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;move&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pushButton release&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;
&lt;/pre&gt;
3. As you see from the code above the method -move is set as the button action. So add IBAction move to the application delegate class. The interface should look so:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Cocoa&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Cocoa&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;interface ImplicitAnimationAppDelegate &lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; NSObject &lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;NSApplicationDelegate&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt; 

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;property &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;assign&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; IBOutlet NSWindow &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;window&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;IBAction&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;move&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;id&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;sender&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;end
&lt;/pre&gt;
And -move method in the implementation file:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;IBAction&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;move&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;id&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; sender
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// The button frame.&lt;/span&gt;
    NSRect senderFrame &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;sender frame&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;//The view bounds. The button belongs to this view.&lt;/span&gt;
    NSRect superBounds &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;sender superview&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; bounds&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Calculate new position within the view bounds.&lt;/span&gt;
    senderFrame&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;origin&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;x &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;superBounds&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;width &lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt;
                            senderFrame&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;width&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; drand48&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    senderFrame&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;origin&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;y &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;superBounds&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;height &lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt;
                            senderFrame&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;height&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; drand48&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Move the button.&lt;/span&gt;
    &lt;span style=&quot;color: dimgrey;&quot;&gt;//[sender setFrame: senderFrame];&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;sender animator&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; setFrame&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; senderFrame&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
The commented line [sender setFrame: senderFrame]; simply moves the button. Line [[sender animator] setFrame: senderFrame]; creates an animation effect - the location change was split up for few movements.&lt;br /&gt;Short description: each thread maintain an automation context. It is possible to object the object of this context as:&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;[NSAnimationContext currentContext];&lt;/span&gt;&lt;br /&gt;Then, it is possible to customize this object, for example, change the duration:&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #134f5c;&quot;&gt;[[NSAnimation currentContext] setDuration: 1.0];&lt;/span&gt;&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/3543463987696553435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-implicit-animation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3543463987696553435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3543463987696553435'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-implicit-animation.html' title='Cocoa: Implicit Animation'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-8229814119278602969</id><published>2012-04-25T15:02:00.001+07:00</published><updated>2012-04-25T15:02:26.542+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Save and Load UIImage in Documents directory on iPhone</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-1083338847854595087&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; position: relative; width: 686px;&quot;&gt;
The following function saves UIImage in test.png file in the user Document folder:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;saveImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;image
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;image &lt;span style=&quot;color: #808030;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; nil&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        NSArray &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;paths &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSSearchPathForDirectoriesInDomains&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSDocumentDirectory&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                      NSUserDomainMask&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; YES&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSString &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;documentsDirectory &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;paths objectAtIndex&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; path &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;documentsDirectory stringByAppendingPathComponent&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; 
                       &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSString stringWithString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;test.png&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSData&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; data &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; UIImagePNGRepresentation&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;image&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;data writeToFile&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;path atomically&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;YES&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;div style=&quot;font-family: Times; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;
The following function loads UIImage from the test.png file:&lt;/div&gt;
&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;loadImage
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSArray &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;paths &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSSearchPathForDirectoriesInDomains&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSDocumentDirectory&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                      NSUserDomainMask&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; YES&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSString &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;documentsDirectory &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;paths objectAtIndex&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSString&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; path &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;documentsDirectory stringByAppendingPathComponent&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; 
                      &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSString stringWithString&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;test.png&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; image &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIImage imageWithContentsOfFile&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;path&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; image&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/8229814119278602969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/save-and-load-uiimage-in-documents.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/8229814119278602969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/8229814119278602969'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/save-and-load-uiimage-in-documents.html' title='Save and Load UIImage in Documents directory on iPhone'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4438059398853786993</id><published>2012-04-25T15:01:00.003+07:00</published><updated>2012-04-25T15:01:33.912+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Create Bitmap Graphics Context on iPhone</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-6872879550376205518&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; position: relative; width: 686px;&quot;&gt;
The following function creates an&amp;nbsp;&lt;i&gt;&lt;b&gt;UIImage&lt;/b&gt;&lt;/i&gt;&amp;nbsp;object:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;makeImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;CGRect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;rect
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    CGFloat width &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGRectGetWidth&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;rect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGFloat height &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGRectGetHeight&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;rect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGColorSpaceRef colorSpace &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGColorSpaceCreateDeviceRGB&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bitsPerComponent &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bytesPerPixel    &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bytesPerRow      &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;width &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bitsPerComponent &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bytesPerPixel &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; dataSize         &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; bytesPerRow &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; height&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;data &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; malloc&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;dataSize&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    memset&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; dataSize&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    CGContextRef context &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGBitmapContextCreate&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; width&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; height&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                bitsPerComponent&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                bytesPerRow&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; colorSpace&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                kCGImageAlphaPremultipliedLast &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt; kCGBitmapByteOrder32Big&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    
    CGColorSpaceRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;colorSpace&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGImageRef imageRef &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGBitmapContextCreateImage&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIImage imageWithCGImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; retain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGImageRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    free&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; result&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;In this function I create a Bitmap Graphics Context:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;CGContextRef context &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;b&gt;CGBitmapContextCreate&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(...)&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&amp;nbsp;and then the image:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;CGImageRef imageRef &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;b&gt;CGBitmapContextCreateImage&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;b&gt;UIImage imageWithCGImage&lt;/b&gt;&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; retain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&amp;nbsp;The created graphics context works fine and, for a test, I can add a drawing code:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;makeImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;CGRect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;rect
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    CGFloat width &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGRectGetWidth&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;rect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGFloat height &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGRectGetHeight&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;rect&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGColorSpaceRef colorSpace &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGColorSpaceCreateDeviceRGB&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bitsPerComponent &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bytesPerPixel    &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bytesPerRow      &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;width &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bitsPerComponent &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bytesPerPixel &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; dataSize         &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; bytesPerRow &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; height&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;data &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; malloc&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;dataSize&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    memset&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; dataSize&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    CGContextRef context &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGBitmapContextCreate&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; width&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; height&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                bitsPerComponent&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                bytesPerRow&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; colorSpace&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                kCGImageAlphaPremultipliedLast &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt; kCGBitmapByteOrder32Big&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    
 &lt;b&gt;   &lt;/b&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;b&gt;// a drawing for a test.&lt;/b&gt;&lt;/span&gt;&lt;b&gt;
    CGContextSetRGBFillColor &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;context&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;
    CGContextFillRect &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;context&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; CGRectMake &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;200&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;100&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;
    CGContextSetRGBFillColor &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;context&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;b&gt;.5&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;
    CGContextFillRect &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;context&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; CGRectMake &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;100&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;&lt;b&gt;200&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;
    
    CGColorSpaceRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;colorSpace&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGImageRef imageRef &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGBitmapContextCreateImage&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIImage imageWithCGImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; retain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGImageRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    free&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; result&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwt-8Cfjc4hwPNAayEINfhaXsgyiTi_IUjLMLrcxL31CwOaxM_KMKh0IUrtz1OiU0HP2_RZLezQ1ofCvqpQSaFaZC4Y9480LW_A9FpRCqJFjHbvtytSasxTBm5VMHFmnotMGo7WhAri-E/s1600/iPhone+Simulator-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwt-8Cfjc4hwPNAayEINfhaXsgyiTi_IUjLMLrcxL31CwOaxM_KMKh0IUrtz1OiU0HP2_RZLezQ1ofCvqpQSaFaZC4Y9480LW_A9FpRCqJFjHbvtytSasxTBm5VMHFmnotMGo7WhAri-E/s1600/iPhone+Simulator-2.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;This way allows a low-level access to the separate pixels of the image. For example:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; y &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; y &lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;bytesPerRow &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bytesPerPixel&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;127&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;127&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;127&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;Probably, this code above contains a mistake. But I see a rectangle on the screen:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4-ugjPuKaAPRUa-uFmJpJWaQIKAlh_2oGjFER3HhTOgOba2udHGLbzlFKF50GozFywUcPsdI1egUuYZQmBGiDSXDzvuyP2Ue0hFxO4ApyRZHJFQPvR6es7-z-cgNcHqu8LZbUNZDqtb8/s1600/iPhone+Simulator-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4-ugjPuKaAPRUa-uFmJpJWaQIKAlh_2oGjFER3HhTOgOba2udHGLbzlFKF50GozFywUcPsdI1egUuYZQmBGiDSXDzvuyP2Ue0hFxO4ApyRZHJFQPvR6es7-z-cgNcHqu8LZbUNZDqtb8/s320/iPhone+Simulator-3.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;175&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;This method allows to draw on another image:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;modify&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;source
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    CGImageRef sourceRef &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; source&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;CGImage&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; width &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGImageGetWidth&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;sourceRef&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; height &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGImageGetHeight&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;sourceRef&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    CGColorSpaceRef colorSpace &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGColorSpaceCreateDeviceRGB&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bitsPerComponent &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bytesPerPixel    &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; bytesPerRow      &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;width &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bitsPerComponent &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bytesPerPixel &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;7&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #603000;&quot;&gt;size_t&lt;/span&gt; dataSize         &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; bytesPerRow &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; height&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;data &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; malloc&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;dataSize&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    memset&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; dataSize&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    
    CGContextRef context &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGBitmapContextCreate&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; width&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; height&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                  bitsPerComponent&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; bytesPerRow&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; colorSpace&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                  kCGImageAlphaPremultipliedLast &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt; kCGBitmapByteOrder32Big&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    CGContextDrawImage&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; CGRectMake&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; width&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; height&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; sourceRef&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// a drawing for a test.&lt;/span&gt;
    CGContextSetRGBFillColor &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextFillRect &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; CGRectMake &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextSetRGBFillColor &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;.5&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextFillRect &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; CGRectMake &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// draw a rectange in a such strange way:&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; y &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;120&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; y &lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;bytesPerRow &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; bytesPerPixel&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            data&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;byteIndex &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    
    CGColorSpaceRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;colorSpace&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGImageRef imageRef &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGBitmapContextCreateImage&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIImage imageWithCGImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; retain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGImageRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;imageRef&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextRelease&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    free&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;data&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; result&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;Of course, without this function will look better, if we will not try to draw a rectangle in a strange way via the pixels. For example:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;oneMore&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;source
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    CGSize size &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;source size&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIGraphicsBeginImageContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    CGRect rect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CGRectMake&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;0.0&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;f&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;0.0&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; size&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;width&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; size&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;height&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;source drawInRect&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;rect&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: dimgrey;&quot;&gt;// a drawing for a test.&lt;/span&gt;
    CGContextRef context &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; UIGraphicsGetCurrentContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextSetRGBFillColor &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextFillRect &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; CGRectMake &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextSetRGBFillColor &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;.5&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    CGContextFillRect &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;context&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; CGRectMake &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;//get image&lt;/span&gt;
    UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; UIGraphicsGetImageFromCurrentImageContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIGraphicsEndImageContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;result&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;I call this function in&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;applicationDidFinishLaunching:&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;applicationDidFinishLaunching&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIApplication&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;application
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    CGRect rect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIScreen mainScreen&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; bounds&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIWindow&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; window &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIWindow alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; initWithFrame&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; rect&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;window setBackgroundColor&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIColor whiteColor&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    rect &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIScreen mainScreen&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; applicationFrame&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;//image = [self makeImage: rect];&lt;/span&gt;
    
 &lt;b&gt;   UIImage&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;*&lt;/b&gt;&lt;/span&gt;&lt;b&gt; source &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;=&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/span&gt;&lt;b&gt;UIImage imageNamed&lt;/b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;@&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;b&gt;&quot;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&lt;b&gt;Abackground.png&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&lt;b&gt;&quot;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;
    image &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;=&lt;/b&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/span&gt;&lt;b&gt;self modify&lt;/b&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;b&gt; source&lt;/b&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;
    
    UIImageView&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; contentView &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIImageView alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; initWithFrame&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; rect&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;contentView setImage&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;image&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;window addSubview&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; contentView&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;contentView release&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; 
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;window makeKeyAndVisible&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfz5VWpbdvwpu3Y5etHdAqnZbEeQyBhIIwg7ohEqmwc4HFq-3MHWKSpDBeExZnFBoYlq_4TZUYqa2UKBmrUXBZCOyg6kokjkyumJ3jFHUmNL5X1ZFPGP_97L_YLzmMROWpDPTU2luNSOE/s1600/iPhone+Simulator-5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfz5VWpbdvwpu3Y5etHdAqnZbEeQyBhIIwg7ohEqmwc4HFq-3MHWKSpDBeExZnFBoYlq_4TZUYqa2UKBmrUXBZCOyg6kokjkyumJ3jFHUmNL5X1ZFPGP_97L_YLzmMROWpDPTU2luNSOE/s320/iPhone+Simulator-5.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;165&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/dq_context.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;iOS Reference Library. Quartz 2D Programming Guide&lt;/a&gt;&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4438059398853786993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/create-bitmap-graphics-context-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4438059398853786993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4438059398853786993'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/create-bitmap-graphics-context-on.html' title='Create Bitmap Graphics Context on iPhone'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwt-8Cfjc4hwPNAayEINfhaXsgyiTi_IUjLMLrcxL31CwOaxM_KMKh0IUrtz1OiU0HP2_RZLezQ1ofCvqpQSaFaZC4Y9480LW_A9FpRCqJFjHbvtytSasxTBm5VMHFmnotMGo7WhAri-E/s72-c/iPhone+Simulator-2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-3299245589384951338</id><published>2012-04-25T15:00:00.004+07:00</published><updated>2012-04-25T15:00:52.572+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Make a snapshot from an iPhone application</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-8174461571244518691&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; position: relative; width: 686px;&quot;&gt;
Today I needed to make a snapshot programmatically. I thought it&#39;s easy:&lt;br /&gt;&lt;a href=&quot;http://iphonedevelopertips.com/user-interface/screen-capture-using-uigetscreenimage.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;[iPhone developer:tips];. Screen Capture using UIGetScreenImage.&lt;/a&gt;&lt;br /&gt;Unfortunately, this approach does not work for me. People say that this API is private.&lt;br /&gt;Ok. Let&#39;s make our own function.&lt;br /&gt;I will add this function to my application delegate class. It looks so:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;interface myDelegate &lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; NSObject&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;UIApplicationDelegate&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    UIWindow&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; window&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; makeSnapshot&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;end
&lt;/pre&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/pre&gt;
I save the snapshot in the camera roll and I have a callback notifying me about an error:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;image&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;image didFinishSavingWithError&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSError &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;error contextInfo&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;contextInfo
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    UIAlertView &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;alert&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Unable to save the image  &lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;error&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
        alert &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIAlertView alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; initWithTitle&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Error&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; 
                               message&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Unable to save image to Photo Album.&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; 
                              delegate&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;self cancelButtonTitle&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Ok&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; 
                     otherButtonTitles&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;nil&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: dimgrey;&quot;&gt;// All is well&lt;/span&gt;
        alert &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIAlertView alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; initWithTitle&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Success&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; 
                                           message&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Image saved to Photo Album.&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; 
                                          delegate&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;self cancelButtonTitle&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Ok&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt; 
                                 otherButtonTitles&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;nil&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;alert show&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;alert release&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
Now from my code I can make the snapshots:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;myDelegate &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;appDelegate &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;myDelegate &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;UIApplication sharedApplication&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; delegate&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; 
&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;appDelegate makeSnapshot&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYJdJ-HH4erCwW8l8_yb1c5-ux-PMrMJ2ahjT9JGTKWhfg7lp6WyaSnuL0psHXiMAX5Qg6DkGgppxl7aP6vj9P6w6jAhySox65HbbqdPDgqtqzbAw8ELz8zWRl-c0sKVqF4U8us8DRJ2g/s1600/iPhone+Simulator-7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYJdJ-HH4erCwW8l8_yb1c5-ux-PMrMJ2ahjT9JGTKWhfg7lp6WyaSnuL0psHXiMAX5Qg6DkGgppxl7aP6vj9P6w6jAhySox65HbbqdPDgqtqzbAw8ELz8zWRl-c0sKVqF4U8us8DRJ2g/s320/iPhone+Simulator-7.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;170&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Of course these methods could be added to a UIView class in my application. So makeSnapshot will look as the following:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; makeSnapshot
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    UIGraphicsBeginImageContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self frame&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;size&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self layer&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; renderInContext&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;UIGraphicsGetCurrentContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIImage &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;screenImage &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; UIGraphicsGetImageFromCurrentImageContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    UIGraphicsEndImageContext&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: dimgrey;&quot;&gt;// Save the captured image to photo album&lt;/span&gt;
    UIImageWriteToSavedPhotosAlbum&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;screenImage&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; self&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; 
                   &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;selector&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;image&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;didFinishSavingWithError&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;contextInfo&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; nil&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
Now, I can call this makeSnapshot method, for example, from touchesBegan:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; touchesBegan&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSSet &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;touches withEvent&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;UIEvent &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;event 
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;self makeSnapshot&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; 
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
If I want to handle the touch event I needto send setUserInteractionEnabled message to the view:&lt;br /&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;contentView setUserInteractionEnabled&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;YES&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgZh7RCw0_jlqXGMvixjTQaPtGJDmby3KB-Q6T92P_EphSn5wJo08BTdXiBGnWZoQoY6qBbUlrDbKjvOa1fUbKvGWHByyjJVbokW_jR6-C7tYMLDYw8bnITJzlfB4y8jS5RDuD2K-apv0/s1600/iPhone+Simulator-8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgZh7RCw0_jlqXGMvixjTQaPtGJDmby3KB-Q6T92P_EphSn5wJo08BTdXiBGnWZoQoY6qBbUlrDbKjvOa1fUbKvGWHByyjJVbokW_jR6-C7tYMLDYw8bnITJzlfB4y8jS5RDuD2K-apv0/s1600/iPhone+Simulator-8.jpg&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;Probably, this code will fail with an OpenGL ES application. I think so, because I see this thread on&amp;nbsp;&lt;a href=&quot;http://www.cocos2d-iphone.org/forum/topic/1722/page/2&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Cocos2d forum&lt;/a&gt;. Seems like people there have found a solution.&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 1.5em;&quot;&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/3299245589384951338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/make-snapshot-from-iphone-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3299245589384951338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3299245589384951338'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/make-snapshot-from-iphone-application.html' title='Make a snapshot from an iPhone application'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYJdJ-HH4erCwW8l8_yb1c5-ux-PMrMJ2ahjT9JGTKWhfg7lp6WyaSnuL0psHXiMAX5Qg6DkGgppxl7aP6vj9P6w6jAhySox65HbbqdPDgqtqzbAw8ELz8zWRl-c0sKVqF4U8us8DRJ2g/s72-c/iPhone+Simulator-7.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-6487632854119233369</id><published>2012-04-25T15:00:00.000+07:00</published><updated>2012-04-25T15:00:12.555+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><title type='text'>Cocoa. Date and Time</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;This small program below detects the current date:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSAutoreleasePool &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; pool &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSAutoreleasePool alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

     NSDate&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; today &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSDate alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
     NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;today is: %@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; today&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;today release&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;        
    &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;pool drain&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;In the console you&#39;ll see:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;[Switching to process 12401 local thread 0x3f03]&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Running…&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;2010-03-06 17:05:45.217 DayOfToday[12401:a0f] today is: 2010-03-06 17:05:45 +0200&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/6487632854119233369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-date-and-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/6487632854119233369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/6487632854119233369'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/cocoa-date-and-time.html' title='Cocoa. Date and Time'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4057471320652949058</id><published>2012-04-25T14:59:00.001+07:00</published><updated>2012-04-25T14:59:41.554+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>The Blocks</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Apple introduced&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;blocks&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;(a segment of code that can be executed any time) in C and Objective-c. It happened in Mac OS X 10.6.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://thirdcog.eu/pwcblocks/&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Later on this feature was back-ported to Mac OS X 10.5 and iPhone by Plausible Labs.&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp; The blocks are also called&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;closures&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;, because they close around variables. Also the blocks can be called&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;lambdas&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;I&#39;d say that the blocks are the same as the regular function pointers in C. From a very general point of view, the main difference is just the symbol caret (^) before the block name instead of the asterisk (*) before the function pointer. Here is a trivial example:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;now&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt; 
            NSDate&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; moment &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSDate date&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Now: %@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; moment&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
        
        now&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The program output is: [Switching to process 41322 thread 0x0] 2011-11-26 18:07:25.202 block4[41322:707] Now: 2011-11-26 16:07:25 +0000 Program ended with exit code: 0 The following program simply creates and synchronously performs a block:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;theBlock&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: #603000;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;x = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%d&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
        theBlock&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;typedef can be used with the blocks:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;typedef&lt;/span&gt; NSInteger &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;Multiply&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
        Multiply multiply &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger x&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSInteger y&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; 
        &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt; 
            NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Entering &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%s&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; __FUNCTION__&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            NSInteger z &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; x &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; y&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; z&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; 
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
        NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%li&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt; * &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%li&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%li&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; multiply&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The main purpose of the blocks is the dispatching them in Grand Central Dispatch. For example:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: #603000;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Hello&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;\r&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        dispatch_queue_t queue &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; dispatch_get_global_queue &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt; DISPATCH_QUEUE_PRIORITY_DEFAULT&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        dispatch_sync&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;queue&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;  &lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: #dd0000; background-image: initial; background-origin: initial; color: white; font-style: italic; font-weight: bold;&quot;&gt;{&lt;/span&gt; &lt;span style=&quot;color: #603000;&quot;&gt;printf&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;This is the block&lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: #dd0000; background-image: initial; background-origin: initial; color: white; font-style: italic; font-weight: bold;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;and here is the output console:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
[Switching to process 38217 thread 0x0]&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;Hello&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;This is the block&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Program ended with exit code: 0&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;In a more formal way, that the block is a self-contained unit of a work, an arranged part of the source code, very similar to the C-style function. The block may contain own variables and can access the variables from outside its own lexical scope. The block can read values of variables defined in the parent scope. Variables, accessed by the block, are copied to the block data structure and can be used by the block later. It&#39;s preferred to keep these variables in the read-only format. However, the blocks can use variables declared with the keyword __block in the parent scope prepended to return data back from the blocks.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;That&#39;s, actually, it. And this is an example of practical use of the blocks - enumeration of the array:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

        NSArray&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; array &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSArray arrayWithObjects&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;First&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Second&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Third&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; nil&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;array enumerateObjectsUsingBlock&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;id object&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; NSUInteger index&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #603000;&quot;&gt;BOOL&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; stop&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
         &lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: #dd0000; background-image: initial; background-origin: initial; color: white; font-style: italic; font-weight: bold;&quot;&gt;{&lt;/span&gt;
             NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;%@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; object&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
         &lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: #dd0000; background-image: initial; background-origin: initial; color: white; font-style: italic; font-weight: bold;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial;&quot;&gt;&lt;div style=&quot;font-family: Times; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; white-space: normal;&quot;&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The following example is interesting because the block is used here as a parameter in the method of a class:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;interface Test &lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt; NSObject

&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;calculate&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;number withBlock&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;block&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;end

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;implementation Test

&lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;calculate&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;number withBlock&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;block
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;the number is &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%li&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; number&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    NSInteger result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; block&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;number&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; result&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;

&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;end

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

        Test&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; test &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;Test alloc&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt; init&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSInteger result &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;test calculate&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;5&lt;/span&gt; withBlock&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;NSInteger number&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: #dd0000; background-image: initial; background-origin: initial; color: white; font-style: italic; font-weight: bold;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; number &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; number&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: #dd0000; background-image: initial; background-origin: initial; color: white; font-style: italic; font-weight: bold;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;the result is &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;%li&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; result&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;test release&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The output:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
[Switching to process 41948 thread 0x0]&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;2011-11-26 18:33:44.383 block5[41948:707] the number is 5&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;b&gt;2011-11-26 18:33:44.385 block5[41948:707] the result is 25&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Program ended with exit code: 0&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 11px/normal Menlo; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;More about the blocks:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;1.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/#featuredarticles/Short_Practical_Guide_Blocks/_index.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;iOS Developer Library. A Short Practical Guide to Blocks.&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;2.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;iOS Developer Library. Blocks Programming Topics.&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;3.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://clang.llvm.org/docs/BlockLanguageSpec.txt&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Language Specifications For Blocks.&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4057471320652949058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/blocks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4057471320652949058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4057471320652949058'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/blocks.html' title='The Blocks'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-3104591180761508218</id><published>2012-04-25T14:58:00.002+07:00</published><updated>2012-04-25T14:58:26.913+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>Sort String Array</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The following code demonstrates how to sort an array of strings in Objective-C:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black;&quot;&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;#import &lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;Foundation&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #400000;&quot;&gt;main&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;int&lt;/span&gt; argc&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;char&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; argv&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;autoreleasepool &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        
        NSArray &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;stringsArray &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSArray arrayWithObjects&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;
                                 &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;string 1&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
                                 &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;String 21&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
                                 &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;string 12&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
                                 &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;String 11&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
                                 &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;String 02&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; nil&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;static&lt;/span&gt; NSStringCompareOptions comparisonOptions &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSCaseInsensitiveSearch &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt; NSNumericSearch &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt;
        NSWidthInsensitiveSearch &lt;span style=&quot;color: #808030;&quot;&gt;|&lt;/span&gt; NSForcedOrderingSearch&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSLocale &lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt;currentLocale &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NSLocale currentLocale&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSComparator finderSort &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;id string1&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; id string2&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            NSRange string1Range &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; NSMakeRange&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;string1 length&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;string1 compare&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;string2 options&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;comparisonOptions range&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;string1Range locale&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;currentLocale&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
        NSArray&lt;span style=&quot;color: #808030;&quot;&gt;*&lt;/span&gt; sortedArray &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;stringsArray sortedArrayUsingComparator&lt;span style=&quot;color: purple;&quot;&gt;:&lt;/span&gt;finderSort&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        NSLog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;finderSort: %@&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; sortedArray&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;        
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/#featuredarticles/Short_Practical_Guide_Blocks/_index.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;This code is taken from iOS Developer Library.&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/3104591180761508218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/sort-string-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3104591180761508218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3104591180761508218'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/sort-string-array.html' title='Sort String Array'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-5220832242090294089</id><published>2012-04-25T14:57:00.001+07:00</published><updated>2012-04-25T14:58:09.311+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>Accelerometer. It&#39;s simple</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The simplest way to use accelerometer in an iPhone application is UIAccelerometer class:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #733ea4; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;UIAccelerometer&lt;span style=&quot;color: black;&quot;&gt;* accelerometer = [&lt;/span&gt;UIAccelerometer&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;sharedAccelerometer&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;This code above shows how to get the accelerometer instance in the code.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The following line sets up the update interval:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;[accelerometer&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;setUpdateInterval&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #2f2fd1;&quot;&gt;1.0&lt;/span&gt;&amp;nbsp;/&amp;nbsp;&lt;span style=&quot;color: #2f2fd1;&quot;&gt;10.0f&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; [accelerometer&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;setDelegate&lt;/span&gt;:&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;];&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;each 0.1 second the accelerometer will update the program that implements delegate&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;method:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;- (&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;)accelerometer:(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;UIAccelerometer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&amp;nbsp;*)acel didAccelerate:(&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;UIAcceleration&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;&amp;nbsp;*)aceler&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #d42722; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;acceleration.x = %+.6f&quot;&lt;span style=&quot;color: black;&quot;&gt;, aceler.&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d42722; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;acceleration.y = %+.6f&quot;&lt;span style=&quot;color: black;&quot;&gt;, aceler.&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d42722; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;acceleration.z = %+.6f&quot;&lt;span style=&quot;color: black;&quot;&gt;, aceler.&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;z&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
}&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Do not forget to add&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #733ea4; font-family: Courier; font-size: 14px;&quot;&gt;UIAccelerometerDelegate&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;, for example, to a view controller class:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;color: #733ea4; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #be299d;&quot;&gt;@interface&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;ViewController :&amp;nbsp;&lt;/span&gt;UIViewController&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;lt;&lt;/span&gt;UIAccelerometerDelegate&lt;span style=&quot;color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
So here is the step-by-step scenario for beginners:&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
1. Create new Single-View project in Xcode.&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
2. In ViewController.h file add&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #733ea4; font-family: Courier; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #733ea4; font-family: Courier; font-size: 14px;&quot;&gt;UIAccelerometerDelegate&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #733ea4; font-family: Courier; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;after&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #733ea4; font-family: Courier; font-size: 14px;&quot;&gt;UIViewController&lt;/span&gt;.&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
3. In ViewController.m file, modify&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier; font-size: 14px;&quot;&gt;viewDidLoad&amp;nbsp;&lt;/span&gt;method:&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
- (&lt;span style=&quot;color: #be299d;&quot;&gt;void&lt;/span&gt;)viewDidLoad&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #401f7d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;super&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;viewDidLoad&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #733ea4; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;UIAccelerometer&lt;span style=&quot;color: black;&quot;&gt;* accelerometer = [&lt;/span&gt;UIAccelerometer&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;sharedAccelerometer&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; [accelerometer&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;setUpdateInterval&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #2f2fd1;&quot;&gt;1.0&lt;/span&gt;&amp;nbsp;/&amp;nbsp;&lt;span style=&quot;color: #2f2fd1;&quot;&gt;10.0f&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; [accelerometer&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;setDelegate&lt;/span&gt;:&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
4. In ViewController.m file, add new method:&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
- (&lt;span style=&quot;color: #be299d;&quot;&gt;void&lt;/span&gt;)accelerometer:(&lt;span style=&quot;color: #733ea4;&quot;&gt;UIAccelerometer&lt;/span&gt;&amp;nbsp;*)acel didAccelerate:(&lt;span style=&quot;color: #733ea4;&quot;&gt;UIAcceleration&lt;/span&gt;&amp;nbsp;*)aceler&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #d42722; font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;acceleration.x = %+.6f&quot;&lt;span style=&quot;color: black;&quot;&gt;, aceler.&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d42722; font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;acceleration.y = %+.6f&quot;&lt;span style=&quot;color: black;&quot;&gt;, aceler.&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #d42722; font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;NSLog&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;@&quot;acceleration.z = %+.6f&quot;&lt;span style=&quot;color: black;&quot;&gt;, aceler.&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;z&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
This program works on iPhone. It does not make much sense to test it simulator.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/5220832242090294089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/accelerometer-its-simple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5220832242090294089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5220832242090294089'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/accelerometer-its-simple.html' title='Accelerometer. It&#39;s simple'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-5903681548684142522</id><published>2012-04-25T14:56:00.000+07:00</published><updated>2012-04-25T14:56:50.291+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>Objective-C. Class Extensions.</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Few years ago, I was writing my first program in Objective-C, I was surprised that there is no way to add a private method to my class. Encapsulation, one of the basic principles of the OO programming, does not work in Objective-C?&amp;nbsp;Unbelievable.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;I found a way to declare a private category in the class main implementation class:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;@interface MyClass (Private)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;- (void)privateMethod;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;@end&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Once, by mistake, probably because of this annoying spell checker helping to type code in Xcode, I forgot the category name:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;@interface MyClass ()&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;- (void)privateMethod;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;@end&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;I thought it&#39;s a bug in the compiler. I decided to not use this way - one day the bug will be fixed. Than, in the github I found a few programs using this way (the category without a name), moreover, people declare instance variables in such anonymous category.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;I found the explanation in iOS Developer Library:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;https://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/chapters/occategories.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Categories and Extensions&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Objective-C 2.0 has a mechanism allowing to add private methods and private variables to a class (the encapsulation in Objective-C is on the highest level). The name of the feature is&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #073763;&quot;&gt;Class Extensions&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Class Extensions is a great place to redeclare a property publicly declared as read only - in the extension the property can be redeclared with the read-write attribute.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/5903681548684142522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/objective-c-class-extensions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5903681548684142522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/5903681548684142522'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/objective-c-class-extensions.html' title='Objective-C. Class Extensions.'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-3715055012248780964</id><published>2012-04-25T14:55:00.003+07:00</published><updated>2012-04-25T14:55:26.886+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>Singleton in iOS Programming</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;What Apple says about Singleton:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/library/mac/#documentation/General/Conceptual/DevPedia-CocoaCore/Singleton.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Cocoa Core Competencies.Singleton&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Creating a Singleton Instance&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;What other people say:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://eschatologist.net/blog/?p=178&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Singletons in Cocoa/Objective-C&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://blog.jh-lim.com/2011/09/implementing-a-singleton-in-ios/&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Implementing a Singleton in iOS&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://www.johnwordsworth.com/2010/04/iphone-code-snippet-the-singleton-pattern/&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Implementing a Singleton in Objective-C / iOS&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Singleton Classes&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://lukeredpath.co.uk/blog/a-note-on-objective-c-singletons.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;A note on Objective-C singletons&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Singletons, AppDelegates and top-level data.&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;A long discussion about it in Stackoverflow:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/145154/what-does-your-objective-c-singleton-look-like&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;What does your Objective-C singleton look like?&lt;/a&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/3715055012248780964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/singleton-in-ios-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3715055012248780964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/3715055012248780964'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/singleton-in-ios-programming.html' title='Singleton in iOS Programming'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-4473335096878862992</id><published>2012-04-25T14:54:00.003+07:00</published><updated>2012-04-25T14:54:53.794+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>Add Settings to an iOS project</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Just find a very nice article about the subject:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://useyourloaf.com/blog/2010/5/18/adding-a-settings-bundle-to-an-iphone-app.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Adding a settings bundle to an iPhone App&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;Please pay attention on the paragraph&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;&quot;Even defaults need defaults…&quot;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;- that&#39;s what I needed in my app. Recently I found out that the default values I set for the settings do not work - a boolean parameter is always&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;NO&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;and does not matter that I set it to&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;YES&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;. This boolean parameter gets its default value only when the user opens the application settings for the first time. This article proposes a solution.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;The source documentation in the&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;i&gt;iOS Developer Library&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/library/ios/#DOCUMENTATION/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Preferences and Settings Programming Guide&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;iOS Developer Library proposes an example:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;https://developer.apple.com/library/mac/#samplecode/FunHouse/Listings/FunHouseAppDelegate_m.html#//apple_ref/doc/uid/DTS40009216-FunHouseAppDelegate_m-DontLinkElementID_12&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;FunHouse.&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&amp;nbsp;Here is a method from this sample:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
+ (&lt;span style=&quot;color: #be299d;&quot;&gt;void&lt;/span&gt;)setupDefaults&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSDictionary&lt;/span&gt;&amp;nbsp;*userDefaultsValuesDict;&lt;/div&gt;
&lt;div style=&quot;color: #401f7d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; userDefaultsValuesDict=[&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSDictionary&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;dictionaryWithObject&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #401f7d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSNumber&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;numberWithBool&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;NO&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;&lt;/span&gt;forKey&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d42722;&quot;&gt;@&quot;useSoftwareRenderer&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #008423; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;// set them in the standard user defaults&lt;/div&gt;
&lt;div style=&quot;color: #401f7d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; [[&lt;/span&gt;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSUserDefaults&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;standardUserDefaults&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #401f7d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; registerDefaults&lt;span style=&quot;color: black;&quot;&gt;:userDefaultsValuesDict];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
Looks promising.&lt;br /&gt;&lt;i&gt;(Do not forget to uninstall your app from the phone and then install again in order to test changes in this code.)&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
In my app, I just expect that all boolean values from the app preferences are NO by default. My code looks so:&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
- (&lt;span style=&quot;color: #be299d;&quot;&gt;void&lt;/span&gt;)loadDebugSettings&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #4d8186; font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.&lt;/span&gt;cleanBackupOn&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;NO&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #4d8186;&quot;&gt;devServer&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;NO&lt;/span&gt;;&lt;/div&gt;
&lt;div style=&quot;color: #4d8186; font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.&lt;/span&gt;logCommunicationOn&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #be299d;&quot;&gt;NO&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #733ea4;&quot;&gt;NSUserDefaults&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;*defaults = [&lt;/span&gt;NSUserDefaults&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #401f7d;&quot;&gt;standardUserDefaults&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;if&lt;/span&gt;&amp;nbsp;( defaults )&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #4d8186;&quot;&gt;cleanBackupOn&lt;/span&gt;&amp;nbsp;= [defaults&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;boolForKey&lt;/span&gt;:&lt;span style=&quot;color: #d42722;&quot;&gt;@&quot;AutoCleanBackupData&quot;&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #4d8186;&quot;&gt;devServer&lt;/span&gt;&amp;nbsp;= [defaults&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;boolForKey&lt;/span&gt;:&lt;span style=&quot;color: #d42722;&quot;&gt;@&quot;DevServerOn&quot;&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;self&lt;/span&gt;.&lt;span style=&quot;color: #4d8186;&quot;&gt;logCommunicationOn&lt;/span&gt;&amp;nbsp;= ![defaults&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;boolForKey&lt;/span&gt;:&lt;span style=&quot;color: #d42722;&quot;&gt;@&quot;LogCommunicationOf&quot;&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 14px/normal Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;
Now, if I need one of these values to be YES, I use&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #401f7d; font-family: Courier; font-size: 14px;&quot;&gt;registerDefaults&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #401f7d; font-family: Courier; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/4473335096878862992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/add-settings-to-ios-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4473335096878862992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/4473335096878862992'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/add-settings-to-ios-project.html' title='Add Settings to an iOS project'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2987916728889265715.post-1748171664409013544</id><published>2012-04-25T14:49:00.003+07:00</published><updated>2012-04-25T14:49:41.477+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Object C"/><title type='text'>Find all words in a sentence</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;This is one of the first samples in Mac OS X Developer Library. I found it in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32&quot; style=&quot;color: #afcc35; text-decoration: none;&quot;&gt;Cocoa Fundamental Guide&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #d42722; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #79482e;&quot;&gt;#import&amp;nbsp;&lt;/span&gt;&amp;lt;Foundation/Foundation.h&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #be299d;&quot;&gt;int&lt;/span&gt;&amp;nbsp;main(&lt;span style=&quot;color: #be299d;&quot;&gt;int&lt;/span&gt;&amp;nbsp;argc,&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;char&lt;/span&gt;&amp;nbsp;* argv[])&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
{&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #be299d; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;@autoreleasepool&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSArray&lt;/span&gt;&amp;nbsp;*param = [[&lt;span style=&quot;color: #733ea4;&quot;&gt;NSProcessInfo&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;processInfo&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;arguments&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSCountedSet&lt;/span&gt;&amp;nbsp;*cset = [[&lt;span style=&quot;color: #733ea4;&quot;&gt;NSCountedSet&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;alloc&lt;/span&gt;]&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;initWithArray&lt;/span&gt;:param];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSArray&lt;/span&gt;&amp;nbsp;*sorted_args = [[cset&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;allObjects&lt;/span&gt;]&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&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;&lt;span style=&quot;color: #401f7d;&quot;&gt;sortedArrayUsingSelector&lt;/span&gt;:&lt;span style=&quot;color: #be299d;&quot;&gt;@selector&lt;/span&gt;(compare:)];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #733ea4;&quot;&gt;NSEnumerator&lt;/span&gt;&amp;nbsp;*enm = [sorted_args&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;objectEnumerator&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;id&lt;/span&gt;&amp;nbsp;word;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;while&lt;/span&gt;&amp;nbsp;(word = [enm&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;nextObject&lt;/span&gt;]) {&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;printf&lt;/span&gt;(&lt;span style=&quot;color: #d42722;&quot;&gt;&quot;%s\n&quot;&lt;/span&gt;, [word&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;UTF8String&lt;/span&gt;]);&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [cset&amp;nbsp;&lt;span style=&quot;color: #401f7d;&quot;&gt;release&lt;/span&gt;];&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #be299d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2f2fd1;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
}&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;here is the Terminal Window:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #414141; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 14px/normal Courier; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 17px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCxyVs3y0ddZkr2oOsVCm5lZbC-LxbKQc6y-w98N61HJjjHreJf2yYxXDkuK0T2iQr1YH5jIy-MEbvOsPta8O5mVgZSguDgvovT4CXo4N1SOM5WRS-WRL0t9ChUtT5_IwSzalItIv1hzQ/s1600/Screen+Shot+2012-04-17+at+2.12.13+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;color: #afcc35; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCxyVs3y0ddZkr2oOsVCm5lZbC-LxbKQc6y-w98N61HJjjHreJf2yYxXDkuK0T2iQr1YH5jIy-MEbvOsPta8O5mVgZSguDgvovT4CXo4N1SOM5WRS-WRL0t9ChUtT5_IwSzalItIv1hzQ/s640/Screen+Shot+2012-04-17+at+2.12.13+PM.png&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; title=&quot;Terminal with the app running&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;I payed attention on this sample, because it shows a useful trick: how to sort and enumerate data, for example an NSDictionary object.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vietapple.blogspot.com/feeds/1748171664409013544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vietapple.blogspot.com/2012/04/find-all-words-in-sentence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/1748171664409013544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2987916728889265715/posts/default/1748171664409013544'/><link rel='alternate' type='text/html' href='http://vietapple.blogspot.com/2012/04/find-all-words-in-sentence.html' title='Find all words in a sentence'/><author><name>Smotion.net</name><uri>http://www.blogger.com/profile/16560713976783659594</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='15' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH0p5sis9NJfYp3nTG2Sc-vBipkBD0hjqs0278IrU6Wn5ZW6ocB8_wAvAf6HAIFxUW0hXYLFOQoSEjiKmnxVdZQq8h-HVAlPUAH39813VhXBsdBuvQFkwbpis67KBc7g/s220/38302_1156918178633_1698116237_290493_2665294_a.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCxyVs3y0ddZkr2oOsVCm5lZbC-LxbKQc6y-w98N61HJjjHreJf2yYxXDkuK0T2iQr1YH5jIy-MEbvOsPta8O5mVgZSguDgvovT4CXo4N1SOM5WRS-WRL0t9ChUtT5_IwSzalItIv1hzQ/s72-c/Screen+Shot+2012-04-17+at+2.12.13+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>