Adding custom objects to object library

2019-02-16 18:37发布

How do I add custom objects to the custom object library in xcode?

I created a class myObject and I want this new object to appear in my object library list for use with IB.

2条回答
我想做一个坏孩纸
2楼-- · 2019-02-16 18:54

Xcode 4 doesn't support IB plug-ins anymore. You're out of luck. (This is a direct quote from a comment of one of the answers to How do you display custom UIViews in InterfaceBuilder?)

查看更多
甜甜的少女心
3楼-- · 2019-02-16 18:58

This is not a direct answer, but if your custom object is a subclass of something else, e.g. NSObject or UIView, etc, then you can simply select the parent object and then change the identity to your subclass with the attributes window.

If you want a direct answer, then read this post: How do you display custom UIViews in InterfaceBuilder? for instructions to create a plug-in for Interface Builder that uses your custom class.

查看更多
登录 后发表回答