Objective-C Singleton problem. Object recognized in one class but not another
问题 My problem is that I can access methods and attributes from the sharedInstance Singleton in one class but I cannot in another. For example, the code below works and is recognized by X-code. Works fine. return [[[SINGLETON sharedInstance]baseballArray]count]; In addition to: theSelectedBaseball = [[[SINGLETON sharedInstance]baseballArray]objectAtIndex:indexPath.row]; SINGLETON *singleton = [SINGLETON sharedInstance]; [singleton setSelectedBaseball:theSelectedBaseball]; However, if I try the