我有一个SubSelectVC处理从SearchVC. 有SubSelectVC一个-(void)didSelectRowAtIndexPath执行这些选项的,大致:
if ([[[UIDevice currentDevice] systemVersion] intValue] < 5) {
((SearchVC *)self.parentViewController.filters.filterValue = @"Some value";
}
else {
((SearchVC *)self.presentingViewController.filters.filterValue = @"Some value";
}
这似乎是糟糕设计的尖叫,但我的意思是,这样做的选择是存在的,而且非常简单!这有什么问题,我该如何解决?(我应该使用委托吗?)