My app is tabbar(+ navigation) application. In FirstViewController I call onModalView.
-(void) onFilter
{
FilterViewController* controller =[[[FilterViewController alloc] initWithNibName:@"Filter" bundle:[NSBundle mainBundle]] autorelease];
[self.navigationController presentModalViewController:controller animated:YES];
}
There are many filters that user can choose in FilterViewController. I want to transit users preferences to FirstViewController. How can I do this ?
I usually use a delegate pattern. Like:
and in your
FirstViewController:In your
FilterViewControllercall- (void)filterViewController:(FilterViewController *)controller didSelectFilters:(NSInteger)filterson the delegate before dismissing it.