0

任何人都可以给我参考或教程,了解如何将 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];
 }
4

1 回答 1

1

请在此处发布之前尝试用谷歌搜索您的查询。你可以在这里找到一个教程 http://iphoneapp-dev.blogspot.in/2010/11/how-to-insert-uitableview-in.html

于 2013-02-11T05:18:29.273 回答