IOS: fill a popover with a tableview

拥有回忆 提交于 2020-01-03 02:43:31

问题


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:


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];


来源:https://stackoverflow.com/questions/6185507/ios-fill-a-popover-with-a-tableview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!