<?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: Obscure iPhone: viewDidLoad and loadNibNamed</title>
	<atom:link href="http://www.theflyingjalapenolives.com/2009/11/obscure-iphone-viewdidload-and-loadnibnamed/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theflyingjalapenolives.com/2009/11/obscure-iphone-viewdidload-and-loadnibnamed/</link>
	<description>injuries sustained turning indy</description>
	<lastBuildDate>Wed, 01 Dec 2010 22:16:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Corey</title>
		<link>http://www.theflyingjalapenolives.com/2009/11/obscure-iphone-viewdidload-and-loadnibnamed/comment-page-1/#comment-270</link>
		<dc:creator>Corey</dc:creator>
		<pubDate>Wed, 18 Nov 2009 16:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.theflyingjalapenolives.com/?p=598#comment-270</guid>
		<description>Interesting. 

As far as I know, loadNibNamed does not create the view controller, the view controller is already instantiated. The view controller being the top level object of the nib is simply a proxy (file&#039;s owner).
It simply unarchives the nib, places those objects in memory, and connects the outlets.

You can of course instantiate a second view controller within a nib, if it is not the top level object. I wonder if this is the way you are accomplishing this?

In that case, I would fully expect viewDidLoad to be called.

In my case, I am loading the nib within the init method of top level view controller. This may in fact be the cause of the problem.</description>
		<content:encoded><![CDATA[<p>Interesting. </p>
<p>As far as I know, loadNibNamed does not create the view controller, the view controller is already instantiated. The view controller being the top level object of the nib is simply a proxy (file&#8217;s owner).<br />
It simply unarchives the nib, places those objects in memory, and connects the outlets.</p>
<p>You can of course instantiate a second view controller within a nib, if it is not the top level object. I wonder if this is the way you are accomplishing this?</p>
<p>In that case, I would fully expect viewDidLoad to be called.</p>
<p>In my case, I am loading the nib within the init method of top level view controller. This may in fact be the cause of the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noel@snappytouch.com</title>
		<link>http://www.theflyingjalapenolives.com/2009/11/obscure-iphone-viewdidload-and-loadnibnamed/comment-page-1/#comment-268</link>
		<dc:creator>Noel@snappytouch.com</dc:creator>
		<pubDate>Wed, 18 Nov 2009 14:51:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.theflyingjalapenolives.com/?p=598#comment-268</guid>
		<description>I load nibs like that all the time, and viewDidLoad will get called... whenever the view is loaded. What&#039;s happening is that loadNibNamed just creates the view controller, but the main view won&#039;t be loaded until you access it.

So for example, calling loadNibNamed followed by adding its view to some hierarchy will cause the view to be loaded and viewDidLoad to be called.

But yes, you have to watch out for that because otherwise it&#039;s possible to do operations on the view controller before the viewDidLoad function is called and can lead to unexpected results (I&#039;ve had my share of bugs because of that early on).</description>
		<content:encoded><![CDATA[<p>I load nibs like that all the time, and viewDidLoad will get called&#8230; whenever the view is loaded. What&#8217;s happening is that loadNibNamed just creates the view controller, but the main view won&#8217;t be loaded until you access it.</p>
<p>So for example, calling loadNibNamed followed by adding its view to some hierarchy will cause the view to be loaded and viewDidLoad to be called.</p>
<p>But yes, you have to watch out for that because otherwise it&#8217;s possible to do operations on the view controller before the viewDidLoad function is called and can lead to unexpected results (I&#8217;ve had my share of bugs because of that early on).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

