Note: This article talks about the Core Data (via Magical Record) so I’m assuming that you are already familiar with it or at least you know the basics. If this it is not the case you can find very good tutorials on the Tim Roadely’s blog or on the Ray Wenderlich’s blog. If you have already work with the Core Data framework you probably found this hard to learn. When you start you have to understand what is the role of each components (NSManagedObject, NSManagedObjectContext, NSManagedObjectModel, NSPersistentStoreCoordinator, etc.) and how they work/communicate between them. Once you understand the principle, you notice that the code is not easy to do too. There is a tons of line of code to manage and it becomes a nightmare when you have to work in a multi-threading context. Here comes the very useful open-source project named Magical Record. This post is intended to give an introduction to using the Magical Record project by showing and explaining you some code snippet extract from a little project which is available here.
Today I spent several hours searching for why I couldn’t install and run my application (targeted for iOS 4.0 and over) on an iPod Touch 2nd generation when there is no problem with the iPad. There was no warning, no error, just this little cue: “Finished running MyApp on iPod touch”
In the previous posts I introduced the CCControl class (to help us to create control objects in Cocos2d) and how to use this to create a basic control like a slider. Today I’ll continue on my run and I’ll show you how to create a button easily from a CCControl. For this we will use a class that I created for this purpose namely the CCControlButton. Unlike the CCMenuItem, the CCControlButton allows you to add a background image (which can be stretchable) and a title text. It was designed to simplify the use of buttons in Cocos2d by copying (almost) the same behavior as the UIButton. I’m going to start by explaining you how to stretch the sprites properly by using the CCScale9Sprite, and then I’ll show you how to use the CCControlButton with examples.
After an upgrading to Xcode 4, I have been having trouble...
It’s been a while I wanted to write a note about...
Note: This article talks about the Core Data (via Magical...
