O'Reilly logo

Sparrow iOS Game Framework Beginner's Guide by Johannes Stein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a base class

To create a base class to manage our assets, we need to use the following steps:

  1. Open the Xcode game template if it's not already open, right-click on the Classes folder, select New Group, and rename the group to Assets.
  2. Right-click on the Assets group and select New File....
  3. Select Objective-C class and click on Next.
  4. Enter AssetsDictionary in the name field, select NSObject from the Subclass of entry, and click on Next.
  5. On the next dialog, click on Create.
  6. Open the AssetsDictionary.h file.
  7. Add an instance variable called _dict, which is a pointer to NSMutableDictionary, as shown in the following code:
    @interface AssetsDictionary : NSObject {
        NSMutableDictionary *_dict;
    }
  8. Add a property called verbose, which is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required