问题描述
如何在xcode中将自定义对象添加到自定义对象库?
How do I add custom objects to the custom object library in xcode?
我创建了一个类myObject,我希望这个新对象出现在我的对象库列表中用于IB。
I created a class myObject and I want this new object to appear in my object library list for use with IB.
推荐答案
这不是一个直接的答案,但如果您的自定义对象是其他东西的子类,例如 NSObject
或 UIView
等,然后您可以简单地选择父对象,然后将标识更改为您的子类属性窗口。
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.
如果你想直接回答,请阅读这篇文章:,以获取为使用自定义类的Interface Builder创建插件的说明。
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.
这篇关于将自定义对象添加到对象库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!