ios - Multiple Segue from Table View Controller -


I have a table view with different information, which the user can update. One of them is "Pilot Information" when users click on this line then they are taking other view controllers where they fill the information of the pilot. (Name phone number etc.) then they can save or cancel both of them, from which they can be returned to the previous table view controller. What I want to do is that the users will be able to click on the pilot information again, and if they choose, the data that they enter and edit, add a solution to each other and use it using the following code Had to give a unique identifier (The pilot is the name of the unit in my original data model, the name of the updatepilot that I had given the segue.)

  - (zero) ready FORSegue: (From UIStoryboardSegue *) Sender: (ID) {If ([[segue identifier] isEqualToString: @ "UpdatePilot"]) {NSManagedObject * selectedPilot = [self.pilots objectAtIndex: [[self.tableView indexPathForSelectedRow] line]]; PilotViewController * destViewController = segue.destinationViewController; DestViewController.pilot = selectedPilot; }}   

!

However, I get an error using uninvited identifier 'Destine Controller', did you mean UIViewController? Is there anything I'm not seeing here? Help will be appreciated

  #import "PilotViewController.h" PilotViewController @interface () @end @implementation PilotViewController - (NSManagedObjectContext *) managedObjectContext {NSManagedObjectContext * reference = nil ;! ID representative = [[UIApplication sharedApplication] representative], if ([rep performSelector: @selector (managedObjectContext)] {reference = [delegated managedObjectContext];} return reference;} @synthesize pilot; - (id) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil {self = [super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; (Auto) {// custom initialization} Return self if;} - (zero) viewDidLoad {[super viewDidLoad]; If (self.pilot) {[self.nameField setText: [self.pilot valueForKey: @ "Pilotnam"]]; [Self.emailField setText: [self.pilot valueFo rkey: @ "pilotEmail"]]; [Self.phoneField setText: [self.pilot valueForKey: @ "Pilotphone"]]; [Self.insuranceField setText: [auto. Pilot Manfurki: @ "Pilot Insurance"]]; } // Make an additional setup after loading the view. } - (zero) did risiv memorialisation [[super daviditamammy warning]; // Any resource settlement which can be reproduced. } // Cancel and code created for Save Buttons - Cancel (IBAction): (ID) Sender {[Self-Captured View Controller Permission: Yes Completed: Zero]; } - Save (IBAction): (ID) sender {NSManagedObjectContext * context = [self managedObjectContext]; If (self.pilot) {// Update existing pilot [self.pilot setValue: self.nameField.text forKey: @ "pilotName"]; [Self.pilot setValue: self.phoneField.text forKey: @ "Pilotphone"]; [Self.pilot setValue: self.insuranceField.text forKey: @ "Pilot Insurance"]; [Self.pilot setValue: self.emailField.text forKey: @ "Pilot Email"]; } Else {// Create a new pilot NSManagedObject * newPilot = [NSEntityDescription insertNewObjectForEntityForName: @ Managed object contexts in "pilot": context]; [NewPilot Set Value: self.nameField.text forKey: @ "PilotName"]; [NewPilot Set Value: self.phoneField.text forKey: @ "Pilotphone"]; [NewPilot Set Value: self.insuranceField.text forKey: @ "Pilot Insurance"]; [NewPilot Set Value: self.emailField.text forKey: @ "Pilot Email"]; } NSError * Error = Zero; // Save the object constantly to the store! (! [Save the reference: & amp; Error]) {NSLog (@ "can not save!% @% @", Error, [error localidelade]); } [Self-captured scene controller permission: Yes complete: zero]; } @end    

segue.destinationViewController try casting (Which is the id ) on the PilotViewController

  PilotViewController * destViewController = (PilotViewController *) segue.destinationViewController;   

In the previous versions of the encoded I believe that I have seen it as a warning; Your build settings can be set to treat all warnings as errors.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -