iphone uitableview - 链接问题?

发布于 2024-11-08 21:30:09 字数 343 浏览 0 评论 0原文

我正在尝试遵循有关 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尴尬癌患者 2024-11-15 21:30:09

您会发现这很有帮助 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.enter image description here

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;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文