iphone - Removing UIView from back/done button -
I have a small app that has some buttons from the Home screen, when these buttons are loaded into a new view , Then all these functions are correct: - (IBAction) showMaps: (ID) sender {MapViewController * viewcontroller = [[MapViewController alloc] initWithNibName: @ "MapView" bundle: zero]; [[See itself] Adsview: View Controller Weave]; [See Controller Release]; } The problem occurs when MapView loads I have created a new IBAction in the MapViewController.h file: - (IBAction) showHome :( Id); and also this action within the MapViewController.m file: - ShowHome: (ID) sender {[self.view removeFromSuperview]; } But no joy, this is a little welcome for a newbie, so more than any help! Your showmaps: method creates a view controller, but not created If you want to stay around it then you have to retain ownership of that visual controller. I suggest adding an asset to my main view controller - which contains showmaps: method below the example code: ...