弹出窗口中的导航控制器
我是 iPad 应用程序开发的新手。
我有兴趣创建一个应用程序,其中有一个弹出窗口,显示带有项目列表的表格视图。然后我选择一个项目,视图钻取到另一个表格视图,其中包含另一个项目列表和一个导航后退按钮。
我要深入的层次是动态的。
请指导我提供适当的资源来帮助我解决问题。
I am a total newbie in the ipad app development.
I am interested in creating an application where i have a popover showing a tableview with list of items. Then i select an item and the view drills to another tableview consisting of another list of items and a navigate back button as well.
the level to which i would be drilling down is dynamic.
Please guide me with appropriate resources to help me solve the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我以前做过并且效果很好!
只需将此函数分配给您的按钮(可能是 UIBarButtonItem):
并将此函数实现到具有 UITableView 的 FirstViewController:
现在您也可以将 UITableView 添加到 SecondViewController。并将此场景用于其他表!
我希望它对你有用!
I did it before and it works well!
Just assign this function to your button (perhaps an UIBarButtonItem):
And implement this function to FirstViewController which has an UITableView:
Now you can add an UITableView to SecondViewController, Too. And use this scenario for other tables!
I hope it works for you!
创建弹出窗口时,只需分配一个 UINavigationController 并使用它来管理弹出窗口本身内的视图层次结构。快速网络搜索发现了本教程,其中涵盖了您需要的内容知道。
我还想补充一点,您应该总体上熟悉 Objective-C 和 iOS 开发。不要尝试盲目地使用您在网上找到的东西而不了解您实际在做什么:)
When you create the popover, you just need to allocate a UINavigationController and use this to manage the view hierarchy within the popover itself. A quick web search revealed this tutorial which covers the things you need to know.
I also meant to add that you should get up to speed with Objective-C and iOS development in general. Don't try and blindly use things you've found on the net without understanding what you're actually doing :)
1)在按钮的操作中(通过单击该按钮,弹出窗口应该出现)编写代码
[这里 PopOverContentViewController 是一个 viewController,其中我有表格视图和几个在弹出窗口到达时应该显示的项目列表] 2
)现在要在单击任何行时更改表格视图,请在 PopOverViewController.m 中键入此代码
[此处 PopOverViewController2 是我们要显示下一个表格视图的 ViewController]
3)为了避免导航时弹出窗口大小发生变化,请在两个视图控制器(即 PopOverContentViewController1 和 PopOverContentViewController2)的 viewDidLoad 中编写以下代码
1)In the action of button (by clicking on that button pop over should appear) write the code
[here PopOverContentViewController is a viewController where i have table view and several list of items which should be displayed when the pop over arrives]
2)now to change the table view on clicking on any of the rows type this code in PopOverViewController.m
[here PopOverViewController2 is the ViewController where we have the next table view to be displayed]
3)to avoid the change in size of popover while navigation write the following code in viewDidLoad of both view controllers (ie PopOverContentViewController1 and PopOverContentViewController2)