<?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>bunnyhero dev &#187; UITabBarController</title>
	<atom:link href="http://www.bunnyhero.org/tag/uitabbarcontroller/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bunnyhero.org</link>
	<description>Notes on iPhone, Flash and Web development</description>
	<lastBuildDate>Mon, 07 Nov 2011 21:49:05 +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>Another UITabBarController change from 2.x to 3.0</title>
		<link>http://www.bunnyhero.org/2009/07/22/another-uitabbarcontroller-change-from-2-x-to-3-0/</link>
		<comments>http://www.bunnyhero.org/2009/07/22/another-uitabbarcontroller-change-from-2-x-to-3-0/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 23:20:33 +0000</pubDate>
		<dc:creator>bunnyhero</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone OS 3.0]]></category>
		<category><![CDATA[UITabBarController]]></category>
		<category><![CDATA[UITabBarControllerDelegate]]></category>

		<guid isPermaLink="false">http://www.bunnyhero.org/?p=222</guid>
		<description><![CDATA[Or actually with UITabBarControllerDelegate, and specifically, with the method tabBarController:didSelectViewController:. According to the docs, the differences: OS called only when tab changes? called when changedprogrammatically? before OS 3.0 YES YES OS 3.0 and later NO NO If you are writing code that runs on both 2.x and 3.0 that needs to get tricky with tabs, [...]]]></description>
			<content:encoded><![CDATA[<p>Or actually with <strong>UITabBarControllerDelegate</strong>, and specifically, with the method <a href="http://developer.apple.com/IPhone/library/documentation/UIKit/Reference/UITabBarControllerDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITabBarControllerDelegate/tabBarController:didSelectViewController:">tabBarController:didSelectViewController:</a>.</p>
<p>According to the docs, the differences:</p>
<table border="1">
<tr>
<th>OS</th>
<th>called only when<br /> tab changes?</th>
<th>called when changed<br />programmatically?</th>
</tr>
<tr>
<td>before OS 3.0</td>
<td><em>YES</em></td>
<td><em>YES</em></td>
</tr>
<tr>
<td>OS 3.0 and later</td>
<td><em>NO</em></td>
<td><em>NO</em></td>
</tr>
</table>
<p>If you are writing code that runs on both 2.x and 3.0 that needs to get tricky with tabs, these changes are a nuisance.</p>
<p>Even more infuriating is that the Apple documentation isn&#8217;t complete. The section ends with the sentence fragment &#8220;If you are implementing&#8230;.&#8221; Yes? If I am implementing <em>what</em>? And what do I do if I am?</p>
<p>Yes, I&#8217;ve already reported documentation error. No response though. My guess is they&#8217;ll just remove the sentence fragment instead of expanding on it :(</p>
<p>[edited: I made a mistake in the table the first time I posted this. Should be fixed now.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bunnyhero.org/2009/07/22/another-uitabbarcontroller-change-from-2-x-to-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UITabBarController timing change from OS 2.X to 3.0</title>
		<link>http://www.bunnyhero.org/2009/06/29/uitabbarcontroller-timing-change/</link>
		<comments>http://www.bunnyhero.org/2009/06/29/uitabbarcontroller-timing-change/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 21:58:50 +0000</pubDate>
		<dc:creator>bunnyhero</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone OS 3.0]]></category>
		<category><![CDATA[UIKit]]></category>
		<category><![CDATA[UITabBarController]]></category>

		<guid isPermaLink="false">http://www.bunnyhero.org/?p=207</guid>
		<description><![CDATA[This is just a short note about a change I discovered between iPhone OS 2.x and 3.0. It&#8217;s not very interesting or exciting but I thought I&#8217;d record it in the off chance that it helps someone else. When the user switches tabs on a UITabBarController in iPhone OS 2.x, the sequence of events is: [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a short note about a change I discovered between iPhone OS 2.x and 3.0. It&#8217;s not very interesting or exciting but I thought I&#8217;d record it in the off chance that it helps someone else.</p>
<p>When the user switches tabs on a <code>UITabBarController</code> in iPhone OS 2.x, the sequence of events is:</p>
<ol>
<li><code>UIView</code> of new tab gets added as a subview</li>
<li><code>UIView</code> of old tab gets removed</li>
<li>The delegate&#8217;s <code>tabBarController:didSelectViewController:</code> method is called</li>
</ol>
<p>Run the same code on iPhone OS 3.0, however, and the sequence is this:
<ol>
<li><code>UIView</code> of new tab gets added as a subview</li>
<li>The delegate&#8217;s <code>tabBarController:didSelectViewController:</code> method is called</li>
<li><code>UIView</code> of old tab gets removed (sometime later, I think it&#8217;s invoked via one of <code>NSObject</code>&#8216;s <code>performSelector:</code> methods)</li>
</ol>
<p>This is a inconsequential change for most, but it might make a difference if you are checking the <code>UIView</code>s&#8217; <code>superview</code> variables in your tab bar controller delegate method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bunnyhero.org/2009/06/29/uitabbarcontroller-timing-change/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

