Given that iOS6 no longer unloads views, and hence no longer calls UIViewController
's viewDidUnload
, I was wondering if there is a reliable way to cause this same behaviour on iOS5?
That is, I'd really like to stop my views unloading on iOS5, for all the same reasons Apple give for why they no longer unload views on iOS 6 (because it no longer saves any significant amount of memory, and is almost always a source of extra bugs). I'd far rather spend my time developing useful features than testing lots of cases that can now only happen on iOS5 and only in low memory!
I've had a search around and can't find anyone who has asked this question before, which surprises me. Could it just be as simple as retaining an extra reference to self.view in viewDidLoad
(and releasing it only in dealloc
)? Are there any likely traps?