如何在 Cocoa Objective-c 中创建 UI 标签?
我正在考虑在我的 Mac 应用程序中构建标记功能。我想做一些像附图中那样的事情。 UI 部分是 Cocoa 原生提供的吗?如果是的话,班级名称是什么?
I'm looking into building a tagging feature in my Mac app. I would like to do something like in the attached image. Is the UI portion offered natively in Cocoa? If so, what is the class name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 NSTokenField 来完成此任务。首先阅读令牌字段编程指南。
You can use NSTokenField to accomplish that. Start by reading Token Field Programming Guide.
几周前我就必须这样做。我也决定使用 NSTokenField 但遇到了很多问题。请参阅此处我的努力。希望你的实施能取得更好的成绩,因为它给了我几个非常短暂的夜晚......
I had to do exactly that a couple of weeks ago. I decided to use NSTokenField as well but ran into quite a number of problems. See my endeavours here. Hope you fare better with your implementation as it gave me a couple of really short nights....