任何人都可以给我参考或教程,了解如何将 uitabelview 包含在带有详细视图控制器的 uipopopover 视图 Controlelr 中,请做必要的事情,在此先感谢
更新:
- (IBAction) useCameraRoll: (id)sender
{
if([self.popoverController isPopoverVisible])
{
[self.popoverController dismissPopoverAnimated:YES];
return;
}
//build our custom popover view
UIViewController* popoverContent = [[UIViewController alloc]init];
UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 140, 102)];
popoverView.backgroundColor = [UIColor blackColor];
UITableView *tblViewMenu = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, 140, 102)];
tblViewMenu.delegate = self;
tblViewMenu.dataSource = self;
tblViewMenu.rowHeight = 32;
[popoverView addSubview:tblViewMenu];
popoverContent.view = popoverView;
popoverContent.contentSizeForViewInPopover = CGSizeMake(140, 102);
self.popoverController = [[UIPopoverController alloc]
initWithContentViewController:popoverContent];
//present the popover view non-modal with a
//refrence to the toolbar button which was pressed
[self.popoverController presentPopoverFromRect:CGRectMake(0, 0, 133, 29)
inView:gal permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}