I have a SubSelectVC
that handles sub-selection choice that is presented modally from a SearchVC
. The SubSelectVC
has a -(void)didSelectRowAtIndexPath
that performs these options, roughly:
if ([[[UIDevice currentDevice] systemVersion] intValue] < 5) {
((SearchVC *)self.parentViewController.filters.filterValue = @"Some value";
}
else {
((SearchVC *)self.presentingViewController.filters.filterValue = @"Some value";
}
This seems like it screams of bad design but, I mean, the option to do it this way is there and it's so easy! What's wrong with this, and how would I make it right? (Should I use delegation?)