OC

Knowledge OS

自定义表情、Emotion、URL&PhoneNumber (LinkLabel、RichLabel)

kingzwt
kingzwt 发布于 2015年03月09日 | 更新于 2015年03月15日
xamppobjc 等0人欣赏。

https://github.com/Joywii/RichLabel

ScreenShot

说明

RickLabel是UILabel的子类。支持显示表情、识别URL、电话号码等(可扩展),URL和电话号码可以点击可以长按。表情部分使用TextKit框架实现。识别URL、电话号码主要参考KILabel

使用条件

  • ARC
  • iOS 7.0+

如何使用

  1. 下载KZRichLabel,把KZRichLabel.h和KZRichLabel.m文件添加到工程中。
  2. 在需要的地方 #import "MZTimerLabel.h"(具体参考Demo)

TODO

  1. ~~Swift版本。~~
  2. 替换系统自带的URL识别和电话号码识别,改成精准的正则表达式。

参考链接

  1. KILabel
  2. CCHLinkTextView
  3. STTweetLabel
  4. NimbusAttributedLabel

License

This code is distributed under the terms and conditions of the MIT license.

共3条回复
楼长 · 回复
vikiliu0310 回复于 2015年03月09日

学习...

2楼 · 回复
coderyi 回复于 2015年03月14日

楼主厉害呀

3楼 · 回复
xamppobjc 回复于 2015年03月15日

赞了个。。。

登录 或者 注册