TTTAttributedLabel:问题检测链接. [英] TTTAttributedLabel : issue detecting links.

查看:93
本文介绍了TTTAttributedLabel:问题检测链接.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用TTTAttributedLabel时遇到了一些问题.有时,给定的URL不会成为链接的颜色,也不会对触摸产生反应.但是,这可以通过上下滚动来解决,因此可以通过重新绘制单元格"视图来解决.我正在查看项目github中的问题,但是似乎相关的问题已经关闭.

I've been having some issues while using TTTAttributedLabel. Sometimes a given URL doesn't get coloured as a link nor does it react to touch. However, this is solved by scrolling down and up, so by making the Cell view re-draw. I've looking at the issues in the project's github, but the ones that seemed related were already closed.

推荐答案

好吧,解决方法是移动 .enabledTextCheckingTypes = NSTextCheckingTypeLink; 自定义UITableViewCell设置为 awakeFromNib 方法.

Well, the fix was to move the .enabledTextCheckingTypes = NSTextCheckingTypeLink; to the awakeFromNib method the custom UITableViewCell.

这篇关于TTTAttributedLabel:问题检测链接.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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