根视图控制器
我现在正在学习这个,所以问题可能有点幼稚。这就是我正在尝试做的事情。我的第一个视图显示了静态填充的表格单元格,当您选择其中一个单元格时,它将弹出一个表单来输入数据。
现在,我一直在阅读有关导航按钮和导航的文档,似乎我需要两个单独的 viewController。一个用于基本应用程序,另一个用于在选择单元格时提出的新页面。这是正确的吗?
抱歉,这可能有点基本,但我不知道在这里该怎么做。谢谢。
I'm learning this right now so the questions might be a little juvenile. Here's what I'm trying to do. I have the first view come up with a cell of the table populated statically, when you select one of the cells it will pull up a form to input data.
Now, I've been reading the documentation about navigation buttons and navigation in general and it seems that I need two separate viewControllers. One for the basic app and another for the new page being brought forward when the cell is picked. Is this correct?
Sorry, this might be a little bit basic but I'm not sure what to do here. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是正确的。您将有两个视图控制器:一个“根”视图控制器,它是最顶层的视图,第二个视图控制器包含编辑表单。
当您点击单元格时,第二个视图控制器将推送到导航堆栈上。
That is correct. You would have two view controllers: a "root" view controller that is the top-most view, and the second view controller that contains the editing form.
The second view controller would get pushed onto the navigation stack when you tap a cell.
基本上,您需要创建第二个 UIViewController 子类,在切换视图时,该视图控制器需要附加到您的主窗口。
Basically you need to create a second UIViewController subclass, this viewcontroller needs to be attached to your main window when switching views.
是的,您需要两个视图控制器。
查看斯坦福大学 CS193P iPhone 应用程序编程课程的第 7 课。它可以在线获取。两张幻灯片和讲座均通过 iTunes U 提供。
CS193P iPhone 应用程序编程
我真的很喜欢观看课程!
Yes, you need two view controllers.
Check out lesson 7 from Stanfords CS193P iPhone Application Programming course. It is available online. Both slides and the lecture through iTunes U.
CS193P iPhone Application Programming
I really enjoyed watching the course!