将自定义对象添加到对象库 [英] Adding custom objects to object library

查看:181
本文介绍了将自定义对象添加到对象库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在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.

如果你想直接回答,请阅读这篇文章:如何在InterfaceBuilder中显示自定义UIView?,以获取为使用自定义类的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.

这篇关于将自定义对象添加到对象库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆