Here's a question (and good answers) about singletones .
You can also use the application delegate, as frankodwyer suggested, and access it from anywhere using:
id delegate = [[UIApplication sharedApplication] delegate];
For ease of use and type safety, I use this category:
@interface UIApplication(MyAppAdditions)
+ (MyAppDelegate*)sharedDelegate;
@end
@implementation UIApplication(MyAppAdditions)
+ (MyAppDelegate*)sharedDelegate {
return (MyAppDelegate*)[[self sharedApplication] delegate];
}
@end
: [UIApplication sharedDelegate]