I have a view controller HomeViewController which shows some grids. Once I go to an inner view controll开发者_开发知识库er by clicking on a grid, I do a "Simulate memory warning" in the Simulator menu. Now, when I press back button go back to HomeViewController, the grids become bare - white in colour.
Any idea why this is happening ? Any suggestions on how to debug this?
Some more details: The HomeViewController view is itself loads from a NIB. Each of the grid (GridView) loads separately from a Grid.xib.
The HomeViewController will unload its view when it receives a memory warning while its view is not visible. Make sure you reload everything viewDidLoad
that gets unloaded when the view is released. Also, your views must not hold any state on their own; you must be able to reconstruct every view with the data you hold in your model and controller objects.
精彩评论