开发者

DataSource on iOS

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜