【问题标题】:Binding an NSArrayController at runtime在运行时绑定 NSArrayController
【发布时间】:2012-02-03 09:33:18
【问题描述】:

我需要在运行时绑定一个NSArrayController's 内容集。内容集是两个NSManagedObject 类之间一对多关系的“多”部分,其中一个在运行时是已知的。

使用的方法是(我认为):

[[self referencesController] bind: <content set> toObject: [self representedObject] withKeyPath: @"references" options: nil]

上面[self referencesController]NSArrayController[self representedObject]是关系的1部分,@"references"是关系的多部分。

我的问题是我对 NSArrayController 的什么属性进行绑定,因此需要为内容集输入什么?

【问题讨论】:

    标签: cocoa cocoa-bindings nsarraycontroller


    【解决方案1】:

    我想你要找的是@"contentArray"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-11
      相关资源
      最近更新 更多