during the prepareForSegue I try to assign a value to property and get the error
2012-05-09 23:14:22.122 LeakSpotter[17709:15b03] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController setCoordLong:]: unrecognized selector sent to instance 0xa86e930'
header:
@property (nonatomic, retain) NSString *CoordLong;
@property (nonatomic, retain) NSString *CoordLat;
They are sythesized.
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
NSLog(@"Fired segue %@", [segue identifier]);
if([[segue identifier] isEqualToString:@"returnToLeakSpotter"]){
NSLog(@"Return to leak spotter segue...");
//ContactsViewController *cvc = (ContactsViewController *)[segue destinationViewController];
}else if ([[segue identifier] isEqualToString:@"gotoTakePhoto"]) {
NSLog(@"Go to photo view");
takePhotoViewController *takePhotoC = [segue destinationViewController];
takePhotoC.CoordLong = @"-9.88";
takePhotoC.CoordLat = @"45.45";
Have I missed something obvious?
Thanks