如何在iPhone中创建链接按钮? [英] how to create a link button in iPhone?

查看:118
本文介绍了如何在iPhone中创建链接按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>

上面的图像像一个婴儿睡觉是一个链接按钮

Here in above figure sleeping like a baby is a link button.

我不想放置一个 UITextView ,因为这只是打开一个 pickerView

I don't want to place a UITextView as this simply opens up a pickerView

推荐答案

使用UIWebView的链接按钮以显示文本。您可以提供HTML以链接到URL。这是你的意思是通过链接按钮?或者当文本被按下时你想要什么?你也可以继承UILabel并检测触碰事件,并做出一些响应。或者将该文本转换为按钮,并使按钮看起来像周围区域,但表现得像一个按钮,并使用其中的一个控制事件来响应选择。

Use a UIWebView to display the text. You can supply HTML to link to a URL. Is that what you mean by link button? or what do you want to happen when that text is pressed? You could also subclass the UILabel and detect the touch down event and do something in response to that. Or but that text into a button and make the button look like the surrounding area but act like a button and use one of its control events to respond to the selection.

这篇关于如何在iPhone中创建链接按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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