iphone uitableview - 链接问题?
我正在尝试遵循有关 xml 解析的教程 http: //www.edumobile.org/iphone/iphone-programming-tutorials/parsing-an-xml-file/ 。该教程没有解释如何链接,这是我所坚持的部分。查看提供的源代码,我可以看到“视图”与“文件所有者”链接。在我的文件中,当我这样做时,我无法链接它们。它不突出。有谁知道为什么?造成这种情况的常见原因是什么? (iPhone 新手)。感谢您的帮助!
I am trying to follow a tutorial about xml parsing http://www.edumobile.org/iphone/iphone-programming-tutorials/parsing-an-xml-file/ . The tutorial does not explain how to link and that is the part that i am stuck on. Looking at the source code provided i can see that "view" is linked with "file owner". In MY file, when i do this, i cannot link them. It does not highlight. Does anyone know why? what are the usual causes for this? (new to iphone). Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您会发现这很有帮助 http://mobiforge.com/developing /story/iphone-programming-fundamentals-outlets-and-actions
这是 XCode4 特有的,但也有助于理解 Interface Builder 基础知识
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/Articles/ 04_InspectingNib.html
如果添加一个新文件(视图控制器的子类),您将获得三个文件.h、.m 和.xib。文件所有者始终连接到正确的视图控制器,这发生在该 nib(.xib) 文件的所有者身上。您可以验证如下图所示。
如果是这种情况,那么我相信您可以始终将您的新元素(标签、按钮)链接到正确的插座。这里只是提醒一下,声明应该以关键字 IBOutlet 开头,以便它显示在界面生成器中。
eq
IBOutlet UILabel *lblTitle;
You will find this helpful http://mobiforge.com/developing/story/iphone-programming-fundamentals-outlets-and-actions
This one is specific to XCode4 but is also helpful to understand the Interface Builder basics
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iPhone101/Articles/04_InspectingNib.html
If you add a new file (a subclass of view controller) you will get three files .h,.m and .xib. The File owner is always connected to the correct View Controller which happens to the owner of this nib(.xib) file. you can verify the same as shown in image below.
If this is the case then I am sure you can always link up your new elements (labels,buttons) to the correct Outlet. Just a reminder here that the declaration should start with the keyword IBOutlet so that It shows up in the interface builder.
eq
IBOutlet UILabel *lblTitle;