UITextView或UIWebView带有看起来像链接的普通单词 [英] UITextView or UIWebView with normal words looking like links
问题描述
我当时正在查看iPhone的Twitter应用程序,感到困惑。
I was looking at the Twitter for iPhone app and was puzzled.
首先,里面有一些普通字,看起来像链接。
First of all, there are normal words looking like links inside.
其次,当我触摸那些类似链接的单词时,文本视图(或Web视图)会跳到下面的相应部分(是的,它没有打开Safari,它只是跳到了该文本/网络视图中的文本)
Second, when I touch those link-like words, the text view (or maybe web view) jumps to the corresponding part below (yes, it doesn't open Safari, it just jumps to the text within that text/web view)
现在我想实现相同的效果。
Now I want to implement the same effects.
- 我应基于什么实施? UITextView或UIWebView?
- 如何使普通单词看起来像链接?
- 如何在此类文本/网络视图中实现平滑过渡? / li>
- I should base my implementation on what? UITextView or UIWebView?
- How to make normal words look like links?
- How to make those smooth jumps within such a text/web views?
谢谢。
推荐答案
您是否考虑过三个图书馆?在其中的一个演示中, TTCatalog
中有一些示例可以准确地显示您要查找的内容。该项目的优点是您可以使用HTML进行样式设置-例如,将锚点转换为可点击的按钮。
Have you considered the three20 library? In one of its demos, TTCatalog
, there are samples of displaying exactly what you're looking for. What's great about the project is that you can use HTML to do the styling -- it'll know to convert an anchor, for example, into a clickable button.
这篇关于UITextView或UIWebView带有看起来像链接的普通单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!