我在我的應用程序中使用了一個TableView,當我點擊一個tabel單元格時,我想要一個Pop View視圖,表格單元格中的所有內容都應該顯示在彈出窗口的視圖中,所以請建議我怎麼做??在tableview單元格上的彈出窗口顯示
我有一些示例代碼,下面哪個是不工作..所以建議與代碼我希望單元格中的所有內容顯示在彈出視圖。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIView *aView = [[UIView alloc] init];
UIPopoverController *popoverController = [[UIPopoverController alloc]
initWithContentViewController:aView];
popoverController.popoverContentSize = CGSizeMake(320, 416);
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[popoverController presentPopoverFromRect:cell.bounds inView:cell.contentView
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
可能重複的[如何顯示彈出單擊在ipad tableview單元格](http://stackoverflow.com/questions/8337149/how-to-display-popover-click-on-a-tableview-cell-在ipad) – visakh7
可能的重複[如何正確地展示從UITableViewCell與UIPopoverArrowDirectionRight或UIPopoverArrowDirectionLeft](http://stackoverflow.com/questions/3015400/how-to-correctly-present-a-popover-from- a-uitableviewcell-with-uipopoverarrowdir) – Louis