I\'m encountering some problems in integrating segue and protocols while implementing a selection list.
In my selection list .h I have:
#import
When using Segue to pass data to the destinationViewController you need to use the method
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"SelectColorSegue"]) {
SelectColor *vc = segue.destinationViewController;
vc.delegate = self;
}
}
from the Apple Docs
The default implementation of this method does nothing. Subclasses can override it and use it to pass any relevant data to the view controller that is about to be displayed. The segue object contains pointers to both view controllers among other information.