如何将按钮添加到 iPad 应用程序的弹出视图中
我想添加一些文本字段和按钮到弹出视图...
如何添加这些,我必须读取用户稍后添加到文本字段中的文本...
....我是否需要单独的视图控制器类控制弹出视图,或者我可以用现有的调用弹出视图的视图进行控制....
任何帮助表示赞赏..
i want to add some text fields and the buttons to the popover view ...
how to add those and i hav to read the text added into text field by user later ...
....should i need seperate view controller class to control popover view or can i control with existed one which calls popover view....
any help Appreciated..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 IB 或以编程方式创建 UIViewController。添加所需的按钮、文本字段以及可能的一些逻辑,并使用此 viewController 来初始化 UIPopoverController (如 Gendolkari 建议的那样)。
Create a UIViewController using IB or programatically. Add needed buttons, textfields and maybe some logic there and use this viewController for initializing an UIPopoverController (as Gendolkari suggested).
UIPopoverView 是通过传入控制弹出窗口内容的 ViewController 来创建的。查看
initWithContentViewController:
,它允许您传递自己的 ViewController。该 ViewController 将具有一个包含您想要的文本字段和按钮的视图。The UIPopoverView is created by passing in a ViewController which controls the content of your popover. Check out the
initWithContentViewController:
, this allows you to pass your own ViewController. That ViewController would have a view with the text fields and button that you want.尝试使用这个:
Try using this: