I am facing some problems in integrating segue and protocols when implementing a picklist.
In my selection list .h I have:
In my selection list .m I have:
@implementation SelectColori @synthesize delegate; //this method is called from a button on ui -(IBAction)saveSelectedColore { [self.delegate rowChosen:[lastIndexPath row]]; [self.navigationController popViewControllerAnimated:YES]; }
I would like to access this select list list by running segue from another kind of table:
@implementation TableList ... - (void)selectNewColor { SelectColor *selectController = [[SelectColor alloc] init]; selectController.delegate = (id)self; [self.navigationController pushViewController:selectController animated:YES];
If I go to the selection list using:
[self.navigationController pushViewController: selectController animated: YES];
a warning appears. If I use instead:
[self performSegueWithIdentifier: @ "SelectColorSegue" sender: self];
warning is not displayed because, I think, I am not going to selectController destination select list. Any ideas to solve this problem?
yassassin
source share