Home > DeveloperSection > Forums > Binding InterfaceBuilder with my NSView class
Karen Green
Karen Green

Total Post:6

Posted on    October-25-2015 11:46 PM

 iPhone iPhone  Ios  Objective C 

 1 Reply(s)
 818  View(s)
Rate this:

I have created a class with one NSString property and four NSColor properties.
I was creating an "Interface BuilderPlugin" for subclass of NSView.
but I can not figure out where to specify plugin project for bindings.
I'll also follow the Interface BuilderPlugin programming guide but not getting sufficient answer for my question, the class description file having lists of outlets and actions but not binding.

So my question is, where I specify the bindings for my class?

Tarun Kumar

Total Post:214

Posted on    October-26-2015 11:51 PM

Create a methods in your initializer class +(void) initialize:
and define them as follows:

+(void) initialize
    [self bindingProperty:@"propertyName"];

above method is used to call the bindingProperty: method.
You may also want to specify the value class as follows:

- (Class)classForBinding:(NSString *)binding
    if ([binding isEqual:@"propertyName"])
        return [NSNumber class];
        return [super classForBinding:binding];

Modified On Oct-26-2015 11:54:56 PM

Don't want to miss updates? Please click the below button!

Follow MindStick