views:

34

answers:

1

Hi , for example , when you playing game , you are play in the game UIView

and when you exit your game and return to the game root menu,

there're a 'exit' button on the game UIView

I wanna click this button to release self view and go back to the main menu

how to do this?

A: 

Your game UIView is owned by a UIViewController ? Then just add a button to the view and hook it up to an IBAction in the UIViewController that pops or dismisses the view controller.

St3fan
My game structure like this: - GameRootMenu(UIVIew) -ChapterChoose(UIView) -eachChapterGame(UIView); when exit form "eachChapterGame" ,I wanna release this chapter's UIView and all scence and element in this chapter I use the a button to remove this chapter view from super view (to root Menu),but not release, and recieve the memory warningand I try to release it on the super view ,it crashed,how to do this?
novertina