と があり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'
誰でも私を助けてもらえますか?