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:

The main viewer H

  @interface Main View Controller: UIViewController {MapViewController * mapViewController; } @property (non-nominal, retaining) map-VUA controller * map view controller; - (IBAction) showMaps: (ID) sender; @end  

MainViewController.m

@implementation MainViewController @ synthesis map ViewController; - (Zero) Dailyock [[mapview controller release]; [Super DeLoc]; } - (IBAction) showMaps: (ID) sender {self.mapViewController = [[[Map WeekCentroler alloc] initWithNibName: @ "mapview" bundle: zero] autoresphere]; [[See itself] Adsview: MapviewConverter See]; } @end

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -