【问题标题】:IBOutletCollection in Xcode 5.1Xcode 5.1 中的 IBOutletCollection
【发布时间】:2014-03-21 12:13:15
【问题描述】:

我想为我的应用程序中的控件列表创建一个IBOutletCollection。所以在我的Document.h 中,我定义了以下插座:

@property (strong) IBOutletCollection(NSControl) NSArray *myControls;

在早期版本中,Outlet Collections 确实出现在 Xcode 的相应 Inspector 中,但在 Xcode 5.1 中似乎并非如此

之前的奥特莱斯收藏

在我的情况下,检查器中没有可见的 Outlet Collections:

如何重新启用此行为?

【问题讨论】:

  • 我没有这个问题,它对我来说是可见的。

标签: objective-c xcode macos cocoa iboutletcollection


【解决方案1】:

当您使用 OS X 标记标记问题时,我假设您正在开发 Mac 项目。
AppKit 不支持IBOutletCollections

UIKit 有 UINibDeclarations.h 定义:

#ifndef IBOutletCollection
#define IBOutletCollection(ClassName)
#endif

AppKit 对应的 NSNibDeclarations.h 没有这样的定义。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多