---
title: "Binding InterfaceBuilder with my NSView class"  
description: "Binding InterfaceBuilder with my NSView class"  
author: "Anonymous User"  
published: 2015-10-25  
updated: 2015-10-26  
canonical: https://www.mindstick.com/forum/33535/binding-interfacebuilder-with-my-nsview-class  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Binding InterfaceBuilder with my NSView class

I have created a [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) with one NSString [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) and four NSColor properties.\
I was creating an "[Interface](https://www.mindstick.com/articles/12101/interfaces-in-java-extending-interfaces) BuilderPlugin" for subclass of NSView.\
but I can not [figure](https://yourviews.mindstick.com/view/87536/what-are-ghosts-jobs-and-how-to-figure-out-them) out where to specify [plugin](https://www.mindstick.com/articles/23236/institute-management-for-wordpress-plugin) [project](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects) for bindings.\
I'll also follow the Interface BuilderPlugin [programming](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) guide but not getting sufficient answer for my [question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time), the class description file having [lists](https://www.mindstick.com/articles/126273/books-commonly-found-on-college-reading-lists) of outlets and [actions](https://www.mindstick.com/forum/156060/what-are-the-actions-performed-by-sql-server) but not binding.

So my question is, where I specify the bindings for my class?

## Replies

### Reply by Tarun Kumar

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];    }    else    {        return [super classForBinding:binding];    }}
```


---

Original Source: https://www.mindstick.com/forum/33535/binding-interfacebuilder-with-my-nsview-class

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
