Hello all
When I receive a memory warning in my navigation based iPhone App the background image disappears in the previously allocated navigation controllers.
The background image is set as the background property of a UIView. This view is then added to the main window of the App delegate:
UIView *backgroundView = [[UIView alloc] initWithFrame: window.frame];
backgroundView.backgroundColor = [UIColor colorWithPatternImage:[[Utilities sharedManager] getImageWithName:@"Hintergrund2"]]; backgroundView.tag = 56789; [window addSubview:backgroundView]; [backgroundView release];
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
After I received the memory warning message and pressed the back button of the navigation controller the previous navigation controller shows up the normal Apple gray background. I have to navigate back to my home screen and navigate forward to "reset" the background image.
Can anyone tell me why the background disappears? It is not because of the image, when I set the background to a standard UIColor like blackColor the background (color) also disappears.
Thank you in advance for your help!
regards
Phil