On 13 Apr 2011, at 4:14 PM, Martin Linklater wrote:

> Hi - I'm working on latest iOS and when testing my code on an iPhone3G I 
> sometimes get this log output:
> 
> 2011-04-14 00:03:08.920 CRDev[18309:307] InGameViewController - viewDidUnload
> 2011-04-14 00:03:09.223 CRDev[18309:307] InGameViewController - viewDidLoad
> 2011-04-14 00:03:09.640 CRDev[18309:307] InGameViewController implementation 
> of -viewDidUnload caused the view to be reloaded. This will adversely impact 
> system performance.
> 2011-04-14 00:03:09.732 CRDev[18309:307] InGameViewController - 
> didReceiveMemoryWarning
> 2011-04-14 00:03:09.745 CRDev[18309:307] InGameViewController - viewDidUnload
> 2011-04-14 00:03:09.781 CRDev[18309:307] InGameViewController - viewDidLoad
> 2011-04-14 00:03:09.934 CRDev[18309:307] InGameViewController implementation 
> of -viewDidUnload caused the view to be reloaded. This will adversely impact 
> system performance.
> 
> 
> Can anyone tell me what's causing this ? It's screwing up some of the child 
> views and causing some subtle bugs...

The log is trying to help you out; -viewDidUnload is called when the view 
controller has discarded its view. The log is telling you that an 
implementation of -viewDidUnload is causing the view to be loaded again.

This can be caused by doing anything which accesses the -view property on the 
view controller inside the -viewDidUnload implementation.

Look around in InGameViewController's implementation of -viewDidUnload and see 
if you're doing anything that involves '[self view]' (or 'self.view' for you 
dot-syntax people :) ).

.chris

-- 
Chris Parker
iOS Frameworks (UIKit)
Apple Inc.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to