IOS:用tableview填充popover [英] IOS: fill a popover with a tableview

查看:27
本文介绍了IOS:用tableview填充popover的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建一个popover并用tableview填充它?我在视图底部的工具栏上有一个按钮,当我按下这个按钮时,我想显示这个弹出框

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

推荐答案

创建 pushviewcontroller 并在 pushviewcontroller 中提供 tableview.像这样.

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

这篇关于IOS:用tableview填充popover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆