0

I found this code:

link

It shows a label about a class of current UIViewController.

How to realize the similar thing for cocos2d? It is enough easy with subclassing but is enough hard with a category. And if I use subclassing for an existing project then it causes a lot of changes in a lot of files.

user2083364
  • 744
  • 1
  • 7
  • 20
  • explain why this is hard with a category? You don't need ivars to render some debug infos like position or contentSize, you can add this as child nodes to the node you want to debug. – CodeSmile Jun 07 '13 at 17:59
  • I see at least 2 problems with category: 1)where to call drawing? Usually it is in -(id)init method, but it is not good to redefine this method in category. 2)I need to overwrite an existing method of a class with a category. If I override another method then I need to call it mannually and so I see no sense in using of this way. – user2083364 Jun 10 '13 at 07:09

0 Answers0