IOS: fill a popover with a tableview

2019-06-07 02:04发布

How can I create a popover and fill it with a tableview? I have a button on a toolbar in bottom of my view, and when i push this button I want to show this popover

1条回答
Emotional °昔
2楼-- · 2019-06-07 02:45

Create pushviewcontroller and in the pushviewcontroller you have to give the tableview. like this.

UIViewController *myPopOver = [[UIViewController alloc] initWithNibName:@"MyPopOverView" bundle:nil];
//(asper your requirement take thiscontroller as tableview)
popoverController = [[[UIPopoverController alloc] initWithContentViewController:myPopOver] retain];
查看更多
登录 后发表回答