Hi mates!
Does anyone have a sample code of UITableViewController used to create highscores?
Or something similar, this is the first time I'm going to use UIKit with cocos2d.
Thanks in advance!
A fast, easy to use, free, and community supported 2D game engine
Hi mates!
Does anyone have a sample code of UITableViewController used to create highscores?
Or something similar, this is the first time I'm going to use UIKit with cocos2d.
Thanks in advance!
HighScoresViewController* quizController = [HighScoresViewController instance];
quizController.view = nil;
quizController.view.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
quizController.view.center = CGPointMake(SCREEN_WIDTH/2.0, SCREEN_HEIGHT/2.0);
quizController.view.exclusiveTouch=YES;
[[[CCDirector sharedDirector] openGLView] addSubview:quizController.view];
HighScoresViewController is a UITableViewController that I've wrapped in a singleton...
Thanks Jordo for reply.
Two questions:
-That should be showed only in my Highscores Scene. So, do I have to remove that view on onExit node?
I guess if you add a view
[[[CCDirector sharedDirector] openGLView] addSubview:quizController.view];
you have to remove it sooner or later, am I right?
-And, I'd like my view is just a part of the screen (a table), the rest is nice cocos2d graphics and buttons (that can be pressed).
How should I manage events?, that is, send the to my view AND my nodes, and process them only if they are in component area. Does
quizController.view.exclusiveTouch=YES;
have any sense in this sceneraio?
Thanks a lot for help, very helpful.
You must log in to post.