There are no reviews yet. Be the first to send feedback to the community and the maintainers!
If your system supports blocks (like iOS 4+) then you should just use the dispatch_once function as follows: + (MyClass *)sharedInstance { static MyClass *sharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedInstance = [[MyClass alloc] init]; // Do any other initialisation stuff here }); return sharedInstance; } This method was sourced from http://stackoverflow.com/questions/7568935/how-do-i-implement-an-objective-c-singleton-that-is-compatible-with-arc courtesy Nick Forge =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= See the "pre-blocks" branch for the old implementation: A Singleton Macro that swaps method implementations at runtime so that only the initialization portion will require syncrhonization (lock). - Specifically it uses method_setImplementation() to dynamically replace the sharedInstance access method with one that does not instantiate a new object and thus does not require @synchronized. It is based on the work here: http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html by Matt Gallagher But changing the implementation to use method swizzling as described here: http://googlemac.blogspot.com/2006/11/synchronized-swimming-part-2.html by Dave MacLachlan of Google.
SneakyJoystick
A Joystick for Cocos2d games. It's pretty solid. Give it a try! This will be updated to always work with latest trunk of Cocos2DPNGPOTimizer
Intended to aid iPhone Development, this is a command line tool to convert all images to PNG with dimensions that are POT (powers of two)PVR2PNG
Takes a pvr (or .pvr.ccz) and outputs a png file with the same name in the same folderTapIt-iPhone-SDK
Love Open Source and this site? Check out how you can help us