我有一个SourceViewController
和一个DesViewController
,有一个变量DesViewController
: @property ( nonatomic , assign , readwrite ) NSString* name ;
但是当我调用 SourceViewController 中的方法时出现问题:
-(void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil ] ;
DestinationViewController* desViewController = [storyboard instantiateInitialViewController ] ;
desViewController.name = @"haah" ;
[self presentViewController:desViewController animated:YES completion:nil ] ;
}
输出 :
'NSInvalidArgumentException', reason: '-[SourceViewController setName:]: unrecognized selector sent to instance 0x6a0d7c0'
任何人都可以帮助我吗?