UITextView或UIWebView带有看起来像链接的普通单词 [英] UITextView or UIWebView with normal words looking like links

查看:63
本文介绍了UITextView或UIWebView带有看起来像链接的普通单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当时正在查看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.


  1. 我应基于什么实施? UITextView或UIWebView?

  2. 如何使普通单词看起来像链接?

  3. 如何在此类文本/网络视图中实现平滑过渡? / li>
  1. I should base my implementation on what? UITextView or UIWebView?
  2. How to make normal words look like links?
  3. 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屋!

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