I come up with this thread, beca开发者_JAVA技巧use I would like to know what is the best method to implement a datasource class on iOS, when you have to access it from many classes.
Is it ok to be a singleton class? Or is there any better method?I don't think that's a bad idea at all. Implement the singleton as Apple suggest.
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW31 (search "Creating a Singleton Instance" in the page)
精彩评论