<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iOS Developer Tips Blog &#187; Rodney Aiglstorfer</title>
	<atom:link href="http://iPhoneDeveloperTips.com/author/rodney/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneDeveloperTips.com</link>
	<description>iOS Developer Tips, Tricks and Tutorials.</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:40:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using NSScanner to convert Hex to RGB Color</title>
		<link>http://iPhoneDeveloperTips.com/general/using-nsscanner-to-convert-hex-to-rgb-color.html</link>
		<comments>http://iPhoneDeveloperTips.com/general/using-nsscanner-to-convert-hex-to-rgb-color.html#comments</comments>
		<pubDate>Sat, 28 Feb 2009 18:31:59 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1604</guid>
		<description><![CDATA[I&#8217;ve found that defining a custom UIColor using RGB values is a little counter intuitive compared to the more common hexadecimal notation used in CSS. This is particularly true if you want to define a color value in a file and don&#8217;t want to have to split it into three separate values. For the most [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found that defining a custom UIColor using RGB values is a little counter intuitive compared to the more common hexadecimal notation used in CSS.  This is particularly true if you want to define a color value in a file and don&#8217;t want to have to split it into three separate values.</p>
<p>For the most part, NSScanner has everything we need to parse data types (int, float, string etc) from a string.<br />
<span id="more-1604"></span><br />
The following is a simple method that will convert a hexadecimal color (e.g. #FFCC88) into an equivalent UIColor object.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIColor <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> colorForHex<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>hexColor <span style="color: #002200;">&#123;</span>
	hexColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>hexColor stringByTrimmingCharactersInSet<span style="color: #002200;">:</span>
				 <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSCharacterSet</span> whitespaceAndNewlineCharacterSet<span style="color: #002200;">&#93;</span>
				<span style="color: #002200;">&#93;</span> uppercaseString<span style="color: #002200;">&#93;</span>;  
&nbsp;
    <span style="color: #11740a; font-style: italic;">// String should be 6 or 7 characters if it includes '#'  </span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>hexColor length<span style="color: #002200;">&#93;</span> <span style="color: #002200;">&amp;</span>lt; <span style="color: #2400d9;">6</span><span style="color: #002200;">&#41;</span> 
		<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>UIColor blackColor<span style="color: #002200;">&#93;</span>;  
&nbsp;
    <span style="color: #11740a; font-style: italic;">// strip # if it appears  </span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>hexColor hasPrefix<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;#&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> 
		hexColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>cString substringFromIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span>;  
&nbsp;
    <span style="color: #11740a; font-style: italic;">// if the value isn't 6 characters at this point return </span>
    <span style="color: #11740a; font-style: italic;">// the color black	</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>hexColor length<span style="color: #002200;">&#93;</span> <span style="color: #002200;">!=</span> <span style="color: #2400d9;">6</span><span style="color: #002200;">&#41;</span> 
		<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>UIColor blackColor<span style="color: #002200;">&#93;</span>;  
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Separate into r, g, b substrings  </span>
    <span style="color: #a61390;">NSRange</span> range;  
    range.location <span style="color: #002200;">=</span> <span style="color: #2400d9;">0</span>;  
    range.length <span style="color: #002200;">=</span> <span style="color: #2400d9;">2</span>; 
&nbsp;
    <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>rString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>hexColor substringWithRange<span style="color: #002200;">:</span>range<span style="color: #002200;">&#93;</span>;  
&nbsp;
    range.location <span style="color: #002200;">=</span> <span style="color: #2400d9;">2</span>;  
    <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>gString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>hexColor substringWithRange<span style="color: #002200;">:</span>range<span style="color: #002200;">&#93;</span>;  
&nbsp;
    range.location <span style="color: #002200;">=</span> <span style="color: #2400d9;">4</span>;  
    <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>bString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>hexColor substringWithRange<span style="color: #002200;">:</span>range<span style="color: #002200;">&#93;</span>;  
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Scan values  </span>
    <span style="color: #a61390;">unsigned</span> <span style="color: #a61390;">int</span> r, g, b;  
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSScanner</span> scannerWithString<span style="color: #002200;">:</span>rString<span style="color: #002200;">&#93;</span> scanHexInt<span style="color: #002200;">:&amp;</span>amp;r<span style="color: #002200;">&#93;</span>;  
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSScanner</span> scannerWithString<span style="color: #002200;">:</span>gString<span style="color: #002200;">&#93;</span> scanHexInt<span style="color: #002200;">:&amp;</span>amp;g<span style="color: #002200;">&#93;</span>;  
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSScanner</span> scannerWithString<span style="color: #002200;">:</span>bString<span style="color: #002200;">&#93;</span> scanHexInt<span style="color: #002200;">:&amp;</span>amp;b<span style="color: #002200;">&#93;</span>;  
&nbsp;
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>UIColor colorWithRed<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">float</span><span style="color: #002200;">&#41;</span> r <span style="color: #002200;">/</span> 255.0f<span style="color: #002200;">&#41;</span>  
                           green<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">float</span><span style="color: #002200;">&#41;</span> g <span style="color: #002200;">/</span> 255.0f<span style="color: #002200;">&#41;</span>  
                            blue<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">float</span><span style="color: #002200;">&#41;</span> b <span style="color: #002200;">/</span> 255.0f<span style="color: #002200;">&#41;</span>  
                           alpha<span style="color: #002200;">:</span>1.0f<span style="color: #002200;">&#93;</span>;  
&nbsp;
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

<p>Notice that we had to first separate our the hex values for the red, green, and blue components first as substrings and then apply the NSScanner to those substrings.</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/general/using-nsscanner-to-convert-hex-to-rgb-color.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Launching Your Own Application via a Custom URL Scheme</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html#comments</comments>
		<pubDate>Mon, 15 Dec 2008 02:40:21 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1251</guid>
		<description><![CDATA[One of the coolest features of the iPhone SDK is an application&#8217;s ability to &#8220;bind&#8221; itself to a custom URL scheme and for that scheme to be used to launch itself from either a browser or from another application on the iPhone. Creating this kind of binding is so simple, its almost criminal not to [...]]]></description>
			<content:encoded><![CDATA[<p>One of the coolest features of the iPhone SDK is an application&#8217;s ability to &#8220;bind&#8221; itself to a custom URL scheme and for that scheme to be used to launch itself from either a browser or from another application on the iPhone.  Creating this kind of binding is so simple, its almost criminal not to use it in your application!</p>
<p><span id="more-1251"></span>Before you get started, you need to figure out how you want you application to respond to the URL.  The simplest way to use custom schemes is to just &#8220;wake up&#8221;; but it is also possible to pass information to the application via the URL, and in so doing, enable the application to do different things when woken up.</p>
<h3>Registering Custom URL Schemes</h3>
<p>Regardless of what you want to do once your application is started, the first step is to register a custom URL scheme with the iPhone.  This is done via the <code>info.plist</code> file located in your application&#8217;s project folder (NOTE: this is the same file you would change to define a custom icon).</p>
<p>By default, when opened, XCode will edit the file in a graphical UI.  It is possible to edit the info.plist file directly in Text mode which may be easier for some people.</p>
<p><strong>Step 1.</strong> Right-Click and &#8220;Add Row&#8221; </p>
<div style="center;"><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/screen-capture1.png" alt="screen-capture.png" border="0" width="500" height="334" /></div>
<p><strong>Step 2.</strong> Select &#8220;URL types&#8221; as the Key </p>
<div style="center;"><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/screen-capture-11.png" alt="screen-capture-1.png" border="0" width="500" height="334" /></div>
<p><strong>Step 3.</strong> Expand &#8220;Item 1&#8243; and provide a value for the URL identifier.  This can be any value, but the convention is to use a &#8220;reverse domain name&#8221; (ex &#8220;com.myapp&#8221;).</p>
<div style="center;"><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/screen-capture-21.png" alt="screen-capture-2.png" border="0" width="500" height="335" /></div>
<p><strong>Step 4.</strong> Add another row, this time to &#8220;Item 1&#8243;.</p>
<div style="center;"><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/screen-capture-31.png" alt="screen-capture-3.png" border="0" width="500" height="335" /></div>
<p><strong>Step 5.</strong> Select &#8220;URL Schemes&#8221; as the Key.</p>
<div style="center;"><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/screen-capture-4.png" alt="screen-capture-4.png" border="0" width="500" height="335" /></div>
<p><strong>Step 6.</strong> Enter the characters that will become your URL scheme (e.g. &#8220;myapp://&#8221; would be &#8220;myapp&#8221;).  It is possible for more than one scheme to be registered by adding to this section though that would be strange thing to do.</p>
<div style="center;"><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/screen-capture-6.png" alt="screen-capture-6.png" border="0" width="500" height="335" /></div>
<p><strong>NOTE:</strong> If you open the info.plist file in a text editor you will see the following has been added to the file &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">CFBundleURLTypes
&nbsp;
    CFBundleURLSchemes
&nbsp;
      myapp
&nbsp;
    CFBundleURLName
    com.yourcompany.myapp</pre></div></div>

<h3>Optionally Handle the URL</h3>
<p>Now that the URL has been registered.  Anyone can start the application by opening a URL using your scheme.  </p>
<p>Here are a few examples &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">myapp://
&nbsp;
myapp://some/path/here
&nbsp;
myapp://?foo=1&amp;amp;bar=2
&nbsp;
myapp://some/path/here?foo=1&amp;amp;bar=2</pre></div></div>

<p>The iPhone SDK, when launching the application in response to any of the URLs above, will send a message to the <strong>UIApplicationDelegate</strong>.  </p>
<p>If you want to provide a custom handler, simply provide an implementation for the message in your delegate.  For example:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>application<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application handleOpenURL<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>url 
<span style="color: #002200;">&#123;</span>
  <span style="color: #11740a; font-style: italic;">// Do something with the url here</span>
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>A common technique is to parse the URL passed in and pull from it the parameters that will be used by various views in the application and store them in the User Preference.  Below is an example where we store the URL as a value parameter &#8220;url&#8221; in just such a manner &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>application<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIApplication <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>application handleOpenURL<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>url
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>url<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>  <span style="color: #a61390;">return</span> <span style="color: #a61390;">NO</span>; <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>URLString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>url absoluteString<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSUserDefaults</span> standardUserDefaults<span style="color: #002200;">&#93;</span> setObject<span style="color: #002200;">:</span>URLString forKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;url&quot;</span><span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSUserDefaults</span> standardUserDefaults<span style="color: #002200;">&#93;</span> synchronize<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>Now you have everything you need to enable others to wake-up your application and even pass it information!  Enjoy!</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html/feed</wfw:commentRss>
		<slash:comments>88</slash:comments>
		</item>
		<item>
		<title>Launching Other Apps within an iPhone Application (Part 2)</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/launching-other-apps-within-an-iphone-application-part-2.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/launching-other-apps-within-an-iphone-application-part-2.html#comments</comments>
		<pubDate>Mon, 15 Dec 2008 00:06:03 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1234</guid>
		<description><![CDATA[To continue on the types of URL Schemes that are supported by the iPhone (see Part 1); today I will show you how to: Launch YouTube &#8220;Deep Link&#8221; to content in iTunes YouTube Links The YouTube URL scheme is used to launch the YouTube application and play the specified video. If your application links to [...]]]></description>
			<content:encoded><![CDATA[<p>To continue on the types of URL Schemes that are supported by the iPhone (see <a href="http://iphonedevelopertips.com/uncategorized/launching-other-apps-within-an-iphone-application.html">Part 1</a>); today I will show you how to:</p>
<ul>
<li>Launch YouTube</li>
<li>&#8220;Deep Link&#8221; to content in iTunes</li>
</ul>
<p><span id="more-1234"></span><br />
<h3>YouTube Links</h3>
<p>The YouTube URL scheme is used to launch the YouTube application and play the specified video. If your application links to YouTube content, you can use this scheme to play videos from your application.</p>
<p><strong>NOTE:</strong>Unlike some schemes, YouTube URLs do not start with a “youtube” scheme identifier. Instead, they are specified as regular http links but are targeted at the YouTube server. The following examples show the basic strings you would use in Safari and an application to show a YouTube Video. In each example, you would need to replace the VIDEO_IDENTIFIER value with identifier of the video you wanted to display:</p>
<pre>

http://www.youtube.com/watch?v=VIDEO_IDENTIFIER

http://www.youtube.com/v/VIDEO_IDENTIFIER
</pre>
<h3>iTunes Links</h3>
<p>The iTunes URL scheme is used to link to content on the iTunes Music Store. The iTunes URL format is complicated to construct, so you create it using an online tool called <a href="">iTunes Link Maker</a>. The tool allows you to select a country destination and media type, and then search by song, album, or artist. After you select the item you want to link to, it generates the corresponding URL.</p>
<p><strong>NOTE:</strong> For more information about the iTunes Link Maker applications take a look at this <a href="http://www.apple.com/itunes/linkmaker/faq/">FAQ from Apple</a>.</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/launching-other-apps-within-an-iphone-application-part-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to &#8220;fix&#8221; Subversion in XCode 3</title>
		<link>http://iPhoneDeveloperTips.com/xcode/how-to-fix-subversion-in-xcode-3.html</link>
		<comments>http://iPhoneDeveloperTips.com/xcode/how-to-fix-subversion-in-xcode-3.html#comments</comments>
		<pubDate>Wed, 10 Dec 2008 18:58:37 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1220</guid>
		<description><![CDATA[If you don&#8217;t take the necessary steps to prepare for subversion, you will run into problems using it in XCode. This is because XCode produces files that &#8220;confuse&#8221; Subversion because it either thinks they are text files when they are really binary files or the reverse. To overcome these limitations, you need to make some [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t take the necessary steps to prepare for subversion, you will run into problems using it in XCode.  This is because XCode produces files that &#8220;confuse&#8221; Subversion because it either thinks they are text files when they are really binary files or the reverse.  To overcome these limitations, you need to make some simple changes to the subversion configuration file in your user home directory.  Here are some steps you can follow to ensure that you will be able to use Subversion within XCode without any issues.<br />
<span id="more-1220"></span><br />
<strong>Step 1. Open the subversion configuration file</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">~/.subversion/config</pre></div></div>

<p><strong>NOTE:</strong> If the &#8220;.subversion&#8221; directory doesn&#8217;t exist yet then run this command which fails but will create the necessary files to get you started:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">svn status</pre></div></div>

<p><strong>Step 2. Enable &#8220;global-ignores&#8221; and add new things to ignore</strong></p>
<p>Find the line that contains the text &#8220;global-ignores&#8221; and append the following text:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">build *~.nib *.so *.pbxuser *.mode* *.perspective*</pre></div></div>

<p><strong>Step 3. Enable &#8220;auto-properties&#8221;</strong></p>
<p>Located and uncomment (e.g. remove the leading &#8220;#&#8221; character) the line that looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># enable-auto-props = yes</pre></div></div>

<p><strong>Step 4. Add additional properties</strong></p>
<p>Then go to the end of the file, in the [auto-props] section, and append these lines:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">*.mode* = svn:mime-type=text/X-xcode
*.pbxuser = svn:mime-type=text/X-xcode
*.perspective* = svn:mime-type=text/X-xcode
*.pbxproj = svn:mime-type=text/X-xcode</pre></div></div>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/xcode/how-to-fix-subversion-in-xcode-3.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Mask an Image</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/how-to-mask-an-image.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/how-to-mask-an-image.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 21:32:46 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1194</guid>
		<description><![CDATA[Masking an image enables a developer to create images with irregular shapes dynamically. Masking is often used to create a user interface that is more compelling and less boring. Take for example the following example &#8230; Creating the mask above is really simple using CoreGraphics on the iPhone. The following is a function that takes [...]]]></description>
			<content:encoded><![CDATA[<p>Masking an image enables a developer to create images with irregular shapes dynamically.  Masking is often used to create a user interface that is more compelling and less boring.  </p>
<p>Take for example  the following example &#8230;</p>
<p>
<img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2008/12/maskingstoryboard1.png" alt="maskingstoryboard.png" border="0" width="480" height="150" />
</p>
<p><span id="more-1194"></span>Creating the mask above is really simple using CoreGraphics on the iPhone.  The following is a function that takes two images and uses one to mask the other.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> maskImage<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>image withMask<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>maskImage <span style="color: #002200;">&#123;</span>
&nbsp;
	CGImageRef maskRef <span style="color: #002200;">=</span> maskImage.CGImage; 
&nbsp;
	CGImageRef mask <span style="color: #002200;">=</span> CGImageMaskCreate<span style="color: #002200;">&#40;</span>CGImageGetWidth<span style="color: #002200;">&#40;</span>maskRef<span style="color: #002200;">&#41;</span>,
		CGImageGetHeight<span style="color: #002200;">&#40;</span>maskRef<span style="color: #002200;">&#41;</span>,
		CGImageGetBitsPerComponent<span style="color: #002200;">&#40;</span>maskRef<span style="color: #002200;">&#41;</span>,
		CGImageGetBitsPerPixel<span style="color: #002200;">&#40;</span>maskRef<span style="color: #002200;">&#41;</span>,
		CGImageGetBytesPerRow<span style="color: #002200;">&#40;</span>maskRef<span style="color: #002200;">&#41;</span>,
		CGImageGetDataProvider<span style="color: #002200;">&#40;</span>maskRef<span style="color: #002200;">&#41;</span>, <span style="color: #a61390;">NULL</span>, <span style="color: #a61390;">false</span><span style="color: #002200;">&#41;</span>;
&nbsp;
	CGImageRef masked <span style="color: #002200;">=</span> CGImageCreateWithMask<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>image CGImage<span style="color: #002200;">&#93;</span>, mask<span style="color: #002200;">&#41;</span>;
	<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>UIImage imageWithCGImage<span style="color: #002200;">:</span>masked<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

<p>Yep &#8230; its just that simple!</p>
<p><strong>NOTE:</strong> The mask image cannot have ANY transparency.  Instead, transparent areas must be white or some value between black and white.  The more towards black a pixel is the less transparent it becomes.</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/how-to-mask-an-image.html/feed</wfw:commentRss>
		<slash:comments>67</slash:comments>
		</item>
		<item>
		<title>&#8220;Default.png&#8221; the secret of the load screen &#8230;</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/defaultpng-the-secret-of-the-load-screen.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/defaultpng-the-secret-of-the-load-screen.html#comments</comments>
		<pubDate>Sat, 22 Nov 2008 04:09:47 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=1070</guid>
		<description><![CDATA[Ever wondered how all of the applications on your iPhone seem to show a loading screen or &#8220;boilerplate&#8221; as soon as the icon is touched and wondered how they get the image to appear quickly? Well the secret is in the presence of a file in your application called Default.png. When the icon for an [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how all of the applications on your iPhone seem to show a loading screen or &#8220;boilerplate&#8221; as soon as the icon is touched and wondered how they get the image to appear quickly?  Well the secret is in the presence of a file in your application called <strong>Default.png</strong>.<br />
<span id="more-1070"></span>When the icon for an application is touched in Springboard (the main application that displays all the apps on your phone and lets you touch an icon to start an application), it looks for a file called <strong>Default.png</strong> in the top level of your application bundle to create the animated starting transition.  If you don&#8217;t specify a Default.png file, you will often see a black screen for a few seconds before your application kicks in.</p>
<p>There is no special info.plist entry you need to make; as you would for the application icon.  All that you need is to add the image as a resource to your project and make sure that it is located at the top level of the application and be spelled exactly like &#8220;Default.png&#8221; (<strong>NOTE:</strong> the &#8216;D&#8217; must be capitalized).</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/defaultpng-the-secret-of-the-load-screen.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to &#8220;unfreeze&#8221; your iPhone Application</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/how-to-unfreeze-your-iphone-application.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/how-to-unfreeze-your-iphone-application.html#comments</comments>
		<pubDate>Mon, 03 Nov 2008 04:32:25 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=978</guid>
		<description><![CDATA[Have you ever found yourself stumped because your application locks up but doesn't seem to crash or in any other way indicate that there is an error?  If you have, then you are likely the victim of a common problem that can occur when you attempt to make certain changes to the UI outside of the main thread.  Put more technically ... you are doing something that is not "Thread Safe".]]></description>
			<content:encoded><![CDATA[<p>Have you ever found yourself stumped because your application locks up but doesn&#8217;t seem to crash or in any other way indicate that there is an error?  If you have, then you are likely the victim of a common problem that can occur when you attempt to make certain changes to the UI outside of the main thread.  Put more technically &#8230; you are doing something that is not &#8220;Thread Safe&#8221;.</p>
<p>To avoid &#8220;freezing&#8221; your application, ensure that any logic that is changing your UI is performed by the Main thread.  One approach to this would be to leverage the <code>NSNotificationCenter</code> but sometimes that is overkill.  A much simpler approach is to use one of the following <code>performSelectorOnMainThread</code> methods on <code>NSObject</code>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;">performSelectorOnMainThread<span style="color: #002200;">:</span>withObject<span style="color: #002200;">:</span>waitUntilDone<span style="color: #002200;">:</span>
performSelectorOnMainThread<span style="color: #002200;">:</span>withObject<span style="color: #002200;">:</span>waitUntilDone<span style="color: #002200;">:</span>modes<span style="color: #002200;">:</span></pre></td></tr></table></div>

<p>Nine-times-out-of-ten this is the magic that will &#8220;thaw&#8221; your application and get it humming along again!</p>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/how-to-unfreeze-your-iphone-application.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Prevent iPhone from Sleeping</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/how-to-prevent-iphone-from-sleeping.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/how-to-prevent-iphone-from-sleeping.html#comments</comments>
		<pubDate>Wed, 29 Oct 2008 04:43:07 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=931</guid>
		<description><![CDATA[The automatic sleep timer is one of the ways the iPhone saves power. If the screen isn&#8217;t touched for a certain amount of time, it dims the screen and eventually turns it off. Although you should leave the timer on, there are times when this is not what you want (games are a good example). [...]]]></description>
			<content:encoded><![CDATA[<p>The automatic sleep timer is one of the ways the iPhone saves power. If the screen isn&#8217;t touched for a certain amount of time, it dims the screen and eventually turns it off. Although you should leave the timer on, there are times when this is not what you want (games are a good example). </p>
<p>To disable the timer, set the idleTimerDisabled property to YES, like so &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> setIdleTimerDisabled<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/how-to-prevent-iphone-from-sleeping.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get Width/Size/Length of UIString in a Specific Font</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/how-to-compute-string-sizes.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/how-to-compute-string-sizes.html#comments</comments>
		<pubDate>Wed, 29 Oct 2008 04:27:57 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=927</guid>
		<description><![CDATA[If you&#8217;ve ever been frustrated trying to find a way to compute the height of a string that wraps you will know my pain. Recently, I discovered that UIKit has made some addition to the NSString class that adds pure magic to the string type. If you lookup the NSString class in the documentation then [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever been frustrated trying to find a way to compute the height of a string that wraps you will know my pain.  Recently, I discovered that <code>UIKit</code> has made some addition to the <code>NSString</code> class that adds pure magic to the string type.  If you lookup the NSString class in the documentation then you will never find out about these messages.  For full details check out the <a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/NSString_UIKit_Additions/NSString_UIKit_Additions.pdf">NSString UIKit Additions Reference</a>.</p>
<p>Here are just some of the messages that have made my life a little easier &#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;">UIFont <span style="color: #002200;">*</span>myFont <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIFont boldSystemFontOfSize<span style="color: #002200;">:</span><span style="color: #2400d9;">15.0</span><span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// Get the width of a string ...</span>
CGSize size <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Some string here!&quot;</span> sizeWithFont<span style="color: #002200;">:</span>myFont<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// Get the width of a string when wrapping within a particular width</span>
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>loremIpsum <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Lorem Ipsum Delores S...&quot;</span>;
CGSize size <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>loremIpsum sizeWithFont<span style="color: #002200;">:</span>myFont
                              forWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">150.0</span> 
		                lineBreakMode<span style="color: #002200;">:</span>UILineBreakModeWordWrap<span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/how-to-compute-string-sizes.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Launching Other Apps within an iPhone Application</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/launching-other-apps-within-an-iphone-application.html</link>
		<comments>http://iPhoneDeveloperTips.com/cocoa/launching-other-apps-within-an-iphone-application.html#comments</comments>
		<pubDate>Mon, 27 Oct 2008 05:09:18 +0000</pubDate>
		<dc:creator>Rodney Aiglstorfer</dc:creator>
				<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=884</guid>
		<description><![CDATA[In an earlier post I talked about how to launch the browser from within an iPhone application using the UIApplication:openURL: method. It is also possible to use this same technique to launch other applications on the iPhone that are very useful. Examples of some of the key applications that you can launch via URL are: [...]]]></description>
			<content:encoded><![CDATA[<p>In an <a href="http://iphonedevelopertips.com/cocoa/launching-the-browser-from-within-an-iphone-application.html">earlier post</a> I talked about how to launch the browser from within an iPhone application using the <code>UIApplication:openURL:</code> method.</p>
<p>It is also possible to use this same technique to launch other applications on the iPhone that are very useful.</p>
<p>Examples of some of the key applications that you can launch via URL are:</p>
<ul>
<li>Launch the Browser (<a href="http://iphonedevelopertips.com/cocoa/launching-the-browser-from-within-an-iphone-application.html">see earlier post</a> )</li>
<li>Launch Google Maps</li>
<li>Launch Apple Mail</li>
<li>Dial a Phone Number</li>
<li>Launch the SMS Application</li>
<li>Launch the Browser</li>
<li>Launch the AppStore</li>
</ul>
<p><span id="more-884"></span></p>
<h5>Launch Google Maps</h5>
<p>The URL string for launching Google Maps with a particular keyword follows this structure:</p>
<p><code>http://maps.google.com/maps?q=<strong>${QUERY_STRING}</strong> </code></p>
<p>The only trick to this is to ensure that the value for the <strong>${QUERY_STRING}</strong> is properly URL encoded.  Here is a quick example of how you would launch Google Maps for a specific address:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Create your query ...</span>
<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> searchQuery <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;1 Infinite Loop, Cupertino, CA 95014&quot;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// Be careful to always URL encode things like spaces and other symbols that aren't URL friendly</span>
searchQuery <span style="color: #002200;">=</span>  <span style="color: #002200;">&#91;</span>addressText stringByAddingPercentEscapesUsingEncoding<span style="color: #002200;">:</span> NSUTF8StringEncoding<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// Now create the URL string ...</span>
<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> urlString <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://maps.google.com/maps?q=%@&quot;</span>, searchQuery<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// An the final magic ... openURL!</span>
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span>urlText<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<h5>Launch Apple Mail</h5>
<p>Also very useful, is the ability to enable a user to quickly send an email by launching the email client in compose mode and the address already filled out.  The format of this URI should be familiar to anyone that has done any work with HTML and looks like this:</p>
<p><code>mailto://<strong>${EMAIL_ADDRESS}</strong> </code></p>
<p>For example, here we are opening the email application and filling the &#8220;to:&#8221; address with <strong>info@iphonedevelopertips.com</strong> :</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;mailto://info@iphonedevelopertips.com&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;</pre></div></div>

<h5>Dial a Phone Number (iPhone Only)</h5>
<p>You can use <code>openURL:</code> to dial a phone number.  One advantage this has over other URLs that launch applications, is that the dialer will return control back to the application when the user hits the &#8220;End Call&#8221; button.</p>
<p>Anyone familiar with J2ME or WML will find this URL scheme familiar:</p>
<p><code>tel://<strong>${PHONE_NUMBER}</strong> </code></p>
<p>Here is an example of how we would dial the number (800) 867-5309:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;tel://8004664411&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<p><strong>NOTE</strong> When providing an international number you will need to include the country code.</p>
<h5>Launch the SMS Application</h5>
<p>Also not supported by the iPod Touch, is the ability to quickly setup the SMS client so that your users can quickly send a text message.  It is also possible to provide the body of the text message.</p>
<p>The format looks like this:</p>
<p><code>sms:<strong>${PHONENUMBER_OR_SHORTCODE}</strong> </code></p>
<p><strong>NOTE:</strong> Unlike other URLs, an SMS url doesn&#8217;t use the &#8220;//&#8221; syntax.  If you add these it will assume it is part of the phone number which is not.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;sms:55555&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<p><strong>NOTE:</strong> According to the official SMS specification, you should be able to send a body as well as the phone number by including &#8220;?body=&#8221; parameter on the end of the URL &#8230; unfortunately Apple doesn&#8217;t seem to support this standard.</p>
<h5>Launching the AppStore</h5>
<p>Finally, it is worth noting that you can launch the AppStore and have the &quot;buy&quot; page of a specific application appear.  To do this, there is no special URL scheme.  All you need to do is open up iTunes to the application you want to launch; right-click on the application icon at the top left of the page; and select <strong>Copy iTunes Store URL</strong> .</p>
<p>The URL will look something like this:</p>
<p><code>http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=291586600&amp;mt=8</code></p>
<p>Launching the AppStore URL is exactly the same as you would launch the browser.  Using the link above, here is an example of how we would launch the AppStore:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>appStoreUrl <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=291586600&amp;amp;mt=8&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span>appStoreUrl<span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove -->]]></content:encoded>
			<wfw:commentRss>http://iPhoneDeveloperTips.com/cocoa/launching-other-apps-within-an-iphone-application.html/feed</wfw:commentRss>
		<slash:comments>69</slash:comments>
		</item>
	</channel>
</rss>

