+exposeBinding not working

前端 未结 2 649
梦谈多话
梦谈多话 2021-01-21 18:53

I\'m trying to expose a custom binding in an subclass of an NSWindowController. I added the following code to the subclass:

+(void)initialize { [self exposeBindin

2条回答
  •  广开言路
    2021-01-21 19:36

    These are only if you're creating an IB palette/plugin. From Cocoa Bindings Programming Topics:

    The other methods—the class method exposeBinding: and the instance methods exposedBindings and valueClassForBinding:—are useful only in an Interface Builder palette.

    When setting up bindings, you can just type in whatever key paths you like; they don't have to be exposed in IB.

提交回复
热议问题