我确信这是一个基本错误,但我找不到它。我有简单的代表,除此之外一切正常。我看不出与我通常处理事情的方式有什么不同。
@interface MasterViewController () <DetailViewControllerDelegate, SettingsViewControllerDelegate>
@end
@implementation MasterViewController
....
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if([[segue identifier] isEqualToString:@"ShowSettings"]) {
// here settingsViewController._delegate is 0x075...
// why? where is this coming from?
SettingsViewController *settingsViewController = [segue destinationViewController];
// here settingsViewController._delegate is 0x00000 which I would expect
[settingsViewController setDelegate:self];
// here settingsViewController._delegate is still 0x0000 -- why?
}
}