简体   繁体   English

如何在iPhone上实现标签云?

[英]How can I implement a tag cloud on iPhone?

like this one here: 喜欢这个:

图片

Is there an existing class that I can use? 我可以使用现有的课程吗?

You can use some of the string drawing methods to find out how large a frame you need for each tag, and then size a bunch of UILabels to fit each word. 您可以使用一些字符串绘制方法来查找每个标记所需的帧大小,然后调整一堆UILabel以适合每个单词。

As you'll likely want your user to interact with the tags, subclass UILabel to handle touches where appropriate. 由于您可能希望用户与标签进行交互,因此将UILabel子类化为适当的触摸处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM