<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: iPhone SDK 3 and Deprecated Method Warnings</title>
	<atom:link href="http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html</link>
	<description>Tips and Tricks for iPhone developers</description>
	<lastBuildDate>Thu, 11 Mar 2010 14:01:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: John Muchow</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/comment-page-1#comment-4858</link>
		<dc:creator>John Muchow</dc:creator>
		<pubDate>Mon, 07 Sep 2009 05:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4858</guid>
		<description>Chris,

iPhone apps are targeted for one base platform. For example, if you create a build for 2.2.1, you cannot include any features of the 3.0 SDK.

John</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>iPhone apps are targeted for one base platform. For example, if you create a build for 2.2.1, you cannot include any features of the 3.0 SDK.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/comment-page-1#comment-4857</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 07 Sep 2009 02:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4857</guid>
		<description>So do you release two different versions of your app, one for = 3.0?  Or do both of these get put into a &quot;universal binary&quot; for the iPhone?</description>
		<content:encoded><![CDATA[<p>So do you release two different versions of your app, one for = 3.0?  Or do both of these get put into a &#8220;universal binary&#8221; for the iPhone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Lazzeri</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/comment-page-1#comment-4121</link>
		<dc:creator>Marco Lazzeri</dc:creator>
		<pubDate>Wed, 22 Jul 2009 09:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4121</guid>
		<description>Great hint! Thanks</description>
		<content:encoded><![CDATA[<p>Great hint! Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wim Verhoef</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/comment-page-1#comment-4041</link>
		<dc:creator>Wim Verhoef</dc:creator>
		<pubDate>Sat, 11 Jul 2009 13:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-4041</guid>
		<description>Mike,

If you are targeting an SDK prior to 3.0 the preprocessor variable __IPHONE_3_0 is undefined so the else part is used. Now if you are compiling for an SDK equal to or after 3.0 the variable WILL be defined so the then part is used. No need to do a comparison.
To check how this works just have a look at Availablity.h in the SDK.
As you see all previous versions are defined as well:

#define __IPHONE_2_0     20000  
#define __IPHONE_2_1     20100  
#define __IPHONE_2_2     20200  
#define __IPHONE_3_0     30000  
#define __IPHONE_NA      99999  /* not available */

If you really want to do a comparison, the comments in Availability.h recommend this:

#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 30000
        // code for OS3.0 and later
#else
        // code for earlier versions
#endif</description>
		<content:encoded><![CDATA[<p>Mike,</p>
<p>If you are targeting an SDK prior to 3.0 the preprocessor variable __IPHONE_3_0 is undefined so the else part is used. Now if you are compiling for an SDK equal to or after 3.0 the variable WILL be defined so the then part is used. No need to do a comparison.<br />
To check how this works just have a look at Availablity.h in the SDK.<br />
As you see all previous versions are defined as well:</p>
<p>#define __IPHONE_2_0     20000<br />
#define __IPHONE_2_1     20100<br />
#define __IPHONE_2_2     20200<br />
#define __IPHONE_3_0     30000<br />
#define __IPHONE_NA      99999  /* not available */</p>
<p>If you really want to do a comparison, the comments in Availability.h recommend this:</p>
<p>#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 30000<br />
        // code for OS3.0 and later<br />
#else<br />
        // code for earlier versions<br />
#endif</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Weller</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/comment-page-1#comment-3784</link>
		<dc:creator>Mike Weller</dc:creator>
		<pubDate>Fri, 03 Jul 2009 14:44:56 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-3784</guid>
		<description>I&#039;ve been using similar code, but my problem is this: what happens when the version goes up to 3_1? Now that code is going to revert to the pre 3.0 version. Is there some way to do a &quot;if version &lt; 3&quot; test?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using similar code, but my problem is this: what happens when the version goes up to 3_1? Now that code is going to revert to the pre 3.0 version. Is there some way to do a &#8220;if version &lt; 3&#8243; test?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maksim Horbul</title>
		<link>http://iPhoneDeveloperTips.com/cocoa/iphone-sdk-3-and-deprecated-methods.html/comment-page-1#comment-3633</link>
		<dc:creator>Maksim Horbul</dc:creator>
		<pubDate>Tue, 30 Jun 2009 07:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=2499#comment-3633</guid>
		<description>The most often met deprecation warning is related to the cell.text. 

UITableViewCell in SDK 3 offers textLabel and detailTextLabel:

#if __IPHONE_3_0
  cell.textLabel.text = @&quot;The Text&quot;;
  cell.detailTextLabel.text = @&quot;The Sub-text&quot;;
#else
  // cell with the custom content view
  cell.text = @&quot;The Text&quot;
  cell.customSubTextLabel = @&quot;The Sub-Text&quot;
#endif

&lt;em&gt;Editor&#039;s note: cell.customSubTextLabel does not exist in 2.x. To have functionality similar to the 3.0 cell.detailTextLabel, you would have to add a custom label to a subclass of cell.&lt;/em&gt;</description>
		<content:encoded><![CDATA[<p>The most often met deprecation warning is related to the cell.text. </p>
<p>UITableViewCell in SDK 3 offers textLabel and detailTextLabel:</p>
<p>#if __IPHONE_3_0<br />
  cell.textLabel.text = @&#8221;The Text&#8221;;<br />
  cell.detailTextLabel.text = @&#8221;The Sub-text&#8221;;<br />
#else<br />
  // cell with the custom content view<br />
  cell.text = @&#8221;The Text&#8221;<br />
  cell.customSubTextLabel = @&#8221;The Sub-Text&#8221;<br />
#endif</p>
<p><em>Editor&#8217;s note: cell.customSubTextLabel does not exist in 2.x. To have functionality similar to the 3.0 cell.detailTextLabel, you would have to add a custom label to a subclass of cell.</em></p>
]]></content:encoded>
	</item>
</channel>
</rss>
