我正在尝试像这样推送视图控制器:
SampleViewControllerB *svcb = [self.storyboard instantiateViewControllerWithIdentifier:@"viewB"];
svcb.delegate = self;
[self.navigationController pushViewController:svcb animated:YES];
如果我删除该 svcb.delegate = self;
行,它可以正常编译并正常工作。但是,如果我尝试添加它,它将无法编译并给出错误
Property 'delegate' not found on object of type 'SampleViewControllerB *'
有人知道如何解决这个问题吗?提前致谢!