Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
HI all..


In my iPhone App, i am having a TabBarController with some UIViewControllers pushed one over other..

If i push some UIViewControllers, and tap the same tabBar, definitely i will come to the RootViewController.

However this is happening in my case as well..

But in simulator everything working fine and in device when i tap the tabBar (if i am in a topViewController after so many pushing) it is coming to the RootViewController only..but it is calling the loadView of RootViewController again...

Say...

I pushed VC1 -> VC2 -> VC3 -> VC4 .

If i am in VC4 and tap its tabBar i am coming to the VC1 (which is OK) but its calling the loadView: of VC1.
(But its maintaining its instance data as same when i created that viewController)
Why so???
 
My best guess would be that the simulator has, effectively, infinite memory (all the RAM on your Mac and it can use virtual memory), whereas the real device has heavily constrained RAM and no VM. Most likely you are using a lot of RAM and the root view controller is unloading the view to conserve RAM and only loading it back when it needs to.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.