Category and Inheritance on ObjectiveC

While Category is a nice way to add functionality to the base class, people like me who come from other object oriented technology such as Flash, will find a little difficult to understand as to how this thing relates to the inheritance chain. The same question came up to my mind and I did a quick research on the topic.

The final thing is Category does the same thing as it tells about itself. It adds functionality to the base class. If you remember this, then there would be no confusion at all.

Well, for that to understand, lets take an example. Suppose there is a Class A and Class B is a subclass of Class A. In the application Class B is used in a lot of places. Now, there is a need to add some more functionality to Class A, so a new category is written as “A+newRole”. Once this category is written, the new functionality is added to the base class and in this case, Class A. That means, all those classes which are child classes of Class A such as Class B, automatically gets the functionality. Thats freaking cool. One can straight away go ahead and call the new methods added in the Category from the child classes. The only thing necessary here is to import the Category file to the appropriate place.

Tested my first iphone game on device

MathIsFun2
I feel so happy to get my opensource game tested on some real devices. The game got tested with iphone3GS, iphone4 and ipodtouch2G. Thanks to all my friends to help me with this. You all rock. And with that I come to a point where may be this game is pushed to Appstore. The tests were good and made some changes as per the retina display of new iPhone4.
Overall it is nice experience to see my game on device.
Cheers to life.

My opensource iphone game now supports accelerometer

I have made some improvements since my last post about the game. The game (Math Is Fun 2) now supports accelerometer. The new version of the game is having below mentioned additions and updations to it.

1. Accelerometer support ( The game mode is now changed by changing phone’s direction )
2. A counter is added ( Which changes question in every 1000 count )
3. Game now displays, total questions played ( asked )
4. Total number of correct answers given by user is displayed
5. Total number of wrong answers given by user is displayed

The code is on GitHub and licensed under Unlicense.