YBAttributeTextTapForSwfit Save

一行代码添加文本点击事件(swfit4.2版本)/a fast way to implement click event text(for swfit4.2)

Project README

YBAttributeTextTapForSwfit

一行代码添加文本点击事件(swfit3.0版本)/a fast way to implement click event text(for swfit3.0)

效果图

(演示效果)

Objective-C版本

https://github.com/lyb5834/YBAttributeTextTapAction.git

已适配swfit4.2

#使用方法

  • 设置 label.attributedText = ?????
  • label.yb_addAttributeTapAction(["xx","xx"...]) { (string, range, int) in coding more... }
  • PS:数组里输入的要点击的字符可以重复

#重要提醒

  • 使用本框架时,最好设置一下NSParagraphStyle中lineSpacing属性,也就是行间距,如果不设置,则默认为0!
  • 使用本框架时,一定要设置label.attributedText = ????? ,不设置则无效果!!
  • 默认添加点击效果,关闭只需设置label.enabledTapEffect = false即可

#版本支持

  • xcode7.0+

  • 如果您在使用本库的过程中发现任何bug或者有更好建议,欢迎联系本人email [email protected]

Open Source Agenda is not affiliated with "YBAttributeTextTapForSwfit" Project. README Source: lyb5834/YBAttributeTextTapForSwfit
Stars
50
Open Issues
8
Last Commit
5 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating