如何在iPhone上创建文本链接 [英] How to create Text Links on iphone

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

问题描述

我想创建类似于Facebook feed的链接.例如,当您在iphone上的fb应用程序中触摸人名时,灰色矩形框表示该框已突出显示.我是否应该为此使用自定义按钮(普通按钮带有边框)?最好的方法是什么

I want to create links similar to the facebook feed. For example, when you touch down on the name of the person in the fb app on iphone, a gray rectangular box indicates it is highlighted. Should I use a custom button for this(normal button has a border)? What's the best approach

推荐答案

UITextView *infoTextView = [[UITextView alloc] initWithFrame:CGRectMake(10, 54, 300, 211)];
[infoTextView setBackgroundColor:[UIColor whiteColor]];
[infoTextView setFont:[UIFont systemFontOfSize:14.0]];
[infoTextView setText:[dict valueForKey:@"desc"]];
infoTextView.layer.cornerRadius = 5;
infoTextView.layer.borderWidth = 1;
infoTextView.clipsToBounds = YES;
[self addSubview:infoTextView];
[infoTextView release];

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

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