将自定义对象添加到对象库

编程入门 行业动态 更新时间:2024-10-07 16:20:04
本文介绍了将自定义对象添加到对象库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

更多推荐

将自定义对象添加到对象库

本文发布于:2023-11-11 08:37:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577907.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:对象   自定义

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!