Anatoliy Gatt
Anatoliy Gatt

Reputation: 2491

Adding Custom Objects in Xcode 4.3


I'm working with Objective-C and Xcode for about a year. I customise a lot of generic objects. Few days ago one of my friend asked me a question, but I couldn't answer him. So I try to do something my self.

For example:
I created this Custom View:
enter image description here

How can I add this View to the Object Library?. Here:

enter image description here

I don't really know why do I need this. But I decide to figure out how to do this. I hope you could help me with this.

Thanks in advance!

Upvotes: 1

Views: 1288

Answers (1)

guitarflow
guitarflow

Reputation: 2970

I don't think this will work. You are putting buttons on "top" of a custom view placeholder. The custom view placeholder is used to be able to use - yeah you guessed right - custom user defined views.

So of which class would your view-with-5-buttons-on-top be? I think you are running into a dead end, because that's just not the way to do it in Xcode. If you want to design your custom view graphically, just create a NIB file for it.

I don't think that you can add your own view objects into the object library. Everything I know of are user-defined code snippets which will show up on the right.


Edit

There were things called IB plugins in Interface Builder and Xcode versions prior to 4. Those were discontinued in Xcode 4 as can be read here for example : http://xcodebook.com/2011/03/no-interface-builder-plugin-support-in-xcode-4/

Further searches for IB plugin gives a lot more guys telling the same.

Best,

Flo

Upvotes: 2

Related Questions