HurkNburkS
HurkNburkS

Reputation: 5510

How to dismiss popoverview from didSelectRowAtIndexPath

I have a popOverView that displays a list of optons the user can use to filter the UITableView on the main view.

I would like it that when the user selects one of the options from the popOverView that I can then dismiss the popOver and continue on with my filtering of the UITableView on the main view.

I have got the filtering working fine, and I can dismiss the popOver when I touch outside the popOver view, it's just I cannot figure out how to do it when a UITableViewCell has been selected.

Upvotes: 0

Views: 183

Answers (1)

Sergey Demchenko
Sergey Demchenko

Reputation: 2954

Assign popover to your table view class, and then do:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [popoverController dismissPopoverAnimated:YES];
}

Upvotes: 2

Related Questions