在prepareForSegue期间,我尝试为属性赋值并得到错误
2012-05-09 23:14:22.122 LeakSpotter [17709:15b03] *由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[UIViewController setCoordLong:]:无法识别的选择器发送到实例 0xa86e930”
标题:
@property (nonatomic, retain) NSString *CoordLong;
@property (nonatomic, retain) NSString *CoordLat;
它们是合成的。
-(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";
我错过了什么明显的东西吗?
谢谢