tags:

views:

136

answers:

5

Anyone know of any example or codes which i am able to input so that a view which is the menu of my game is able to start the game on clicking start game button? Its like from menu view to the game view.

I had already done up the game just need my menu to link to the game. Thanks alot for any help.

+1  A: 

Assuming that you're not using a game engine, you could use a UINavigationController and just use pushViewController:animated: You could also use an Animation block and addSubview:

These are very elementary principles, how did you manage to finish an entire game without learning about view hierarchies?

jessecurry
A: 

You can use a UINavigationController to manage switching to/from the game and the menu. Alternatively, you can use UIAnimation to fade one in, while the other fades out, or move one view off-screen while the other moves on-screen. What sort of effect were you hoping for?

Mark Bessey
A: 

You don't have to use a UINavigationController since you can add sub views to the main window as well.

Check out this tutorial for a good example. http://icodeblog.com/2009/03/18/iphone-game-programming-tutorial-part-3-splash-screen/

chris
A: 

I am very very new to iphone C programming, I finished the game with the help of the examples given to me, i just need create a very very simple game.

Any effect will do as long as they are easy to implement, i tried using splash but during the splash my game had already started running behind. So i need to use a button to fire up the app so everything works in line.

Simpletic
+1  A: 

Hi bro you can do this by two ways which i know. first is on the click of the button you need to call the view to which you want to navigate as [self presentmodalviewcontroller:gameview animated:yes].This just overlaps the view on another view.game view is the view to which you want to navigate,and do remember to make its object by allocation before using the abovve line.The another good way is to use uinavigation controller which push and pop the view and is the good practice.Alloc the navigation controller with rootviewcontroller which is your present view.And to navigate just use [self.navigationcontoller pushviewcontroller:gameview] and to pop the view to come back to the previous view you just need to right [self.navigationcontroller popviewcontroller animated:yes]; I think this would be helpful for you,if so please vote up for me.And really congrats for completing your game application.

sabby