开发者

Trouble dismissing popover when deep inside nested tableview

I have an iPad program that has the following structure:

Viewcontroller VC1 VC 1 declares UIPopover controller inside开发者_Python百科 Popover controller I call a Nav controller which calls a TableView Controller TC1

TC1 pushes to a second Tableviewer Controller TC2

When the user selects a row in the table I want to dismiss the Popup.

Here is the code inside TC2:

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

I'm getting an error popOverController not declared

So I figure that since I'm inside the Tableviewcontroller object it doesn't know about the popOverController.

What I don't have the first clue about is how to get a message back to the popOverController delegate (if that's even right) to send the dismiss command.

This appears to be a well versed question on the internet, but no one seems to be doing drill down tableviews inside a popup so I can't find an answer anywhere.


set TC2 delegate as TC1 and TC1 delegate as VC1. inside didselectrow function in TC2, call delegate function in TC1 which inturn calls function in VC1. there in VC1 you can easily dismiss the popover. The same problem i have faced and solved it in this fashion.

Thanks for your navcontrol suggestion to push viewcontroller onto popover. It helped me to show drill down tableviews inside popover.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜