Objective-C singleton pattern in iOS 5+
问题 I've been reading a lot of threads and blog articles about how to implement a singleton in objective-c, several of them maybe being a bit deprecated (year 2010 or earlier), and it seems like people have different opinions regarding this issue... Does Apple have documentation about implementing a singleton? I couldn't find it. If so, could somebody tell me where? I need a singleton for a class that has some both public and private variables. Currently, this is the implementation I have for