// Customer GETTER for creating a singleton of this objectOr something like this
WhatsOverThereViewController* whatsOverThereViewController = nil;
- (WhatsOverThereViewController*) whatsOverThereViewController {
if(whatsOverThereViewController != nil)
{
NSLog(@"We already have one of these things, I'm NOT creating another one");
return whatsOverThereViewController;
}
WhatsOverThereViewController *whatsOverThereViewController = [[WhatsOverThereViewController alloc] init];
NSLog(@"ALLOC / INIT the WhatsOverThereVC");
return whatsOverThereViewController;
}
reference tutorials/templates;
Provides code for cut & paste - http://www.johnwordsworth.com/2010/04/iphone-code-snippet-the-singleton-pattern/