Binding a custom NSView: Does it demand creating an IBPlugin?

前端 未结 4 1121
闹比i
闹比i 2021-02-19 09:01

I have created a subclass of NSView to draw an image as a pattern:

@interface CePatternView : NSView
{
    NSImage*    image;
    id      observableObjectForImag         


        
4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 09:25

    No, you can use the method

    bind:toObject:withKeyPath:options:

    to establish your binding programmatically. I believe you do have to create an IB palette to get the bindings to appear in Interface Builder, but for a one-off class I don't intend to reuse, I've never bothered.

提交回复
热议问题