根据我所读到的内容,大多数时候我们在为 iPhone 创建应用程序时都会处理视图。将子视图添加到表视图,将表视图添加到 UIView...等
所以我的问题是如何混合和匹配所有视图?假设我首先使用 Xcode(标签栏应用程序)中的模板,它基本上给了我 2 个“部分”,一个带有 2 个 UIView 的标签栏控制器。我修改了 UIView 的代码,这样我最终得到了 2 个表视图。现在,每当我点击表格视图上的单元格时,我都想向表格视图添加额外的视图。我创建了一个新的视图控制器,调用firstDetailView并将它们连接起来,但没有任何反应。令人惊讶的是,该应用程序没有崩溃。
我可能做错了或者错过了一些事情。我是编程新手。任何帮助将不胜感激。
谢谢。
From What I understand based on what I read, most of the time we will be dealing with view when creating apps for the iPhone. Adding sub view to table view, adding table view to a UIView....etc
So my question is how do I go about mix and match all the views? Let say I start off by using a template in Xcode (Tab Bar Application) which basically give me 2 "section", a tab bar controller with 2 UIView to began with. I modified the code for the UIView so that I end up with 2 table view. Now I wanted to an add additional view to the table view whenever I tap on a cell on the table view. I create a new view controller call firstDetailView and hook them up but nothing happen. Surprisingly the app doesn't crash.
I might do it wrongly or have missed something. I am a newbies to programming. Any help would be appreciated.
Thanks.
发布评论
评论(1)
如果您想处理由视图控制器处理的不同视图,您应该阅读 视图控制器编程指南
尝试第一手阅读Apple文档,它们非常好,所有基本内容都在那里解释。
If you want to deal with different views which are handled by a view controller you should read the View Controller Programming Guide
Try to read the Apple documentation in the first hand, they are pretty good and all basic stuff is explained there.