Sunday, July 22, 2012

thumbnail

Navigating back & forward in a UINavigationController causes crash

I think this may have something to do with memory managment. Instead of using viewController as a local variable, set it up as a property and get rid of the release.

@property(nonatomic, retain) UIViewController *viewController;
synth the getters and setters (in the .m file)

@synthesize viewcontroller;
and use the dot syntax to access it.

self.viewController
This will release the old controller if one exist and ensure that the object is still around when the Nav Controller needs it to be.

Subscribe by Email

Follow Updates Articles from This Blog via Email

No Comments

comments

About me

simple one.