{"id":18695528,"url":"https://github.com/targetcloud/tglabel","last_synced_at":"2025-04-12T07:25:40.779Z","repository":{"id":56922871,"uuid":"83776525","full_name":"targetcloud/TGLabel","owner":"targetcloud","description":null,"archived":false,"fork":false,"pushed_at":"2017-08-08T13:36:47.000Z","size":1074,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T23:47:11.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/targetcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-03T08:35:02.000Z","updated_at":"2019-07-31T14:43:27.000Z","dependencies_parsed_at":"2022-08-21T05:20:15.511Z","dependency_job_id":null,"html_url":"https://github.com/targetcloud/TGLabel","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetcloud%2FTGLabel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetcloud%2FTGLabel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetcloud%2FTGLabel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/targetcloud%2FTGLabel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/targetcloud","download_url":"https://codeload.github.com/targetcloud/TGLabel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248532398,"owners_count":21119901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T11:15:24.908Z","updated_at":"2025-04-12T07:25:40.759Z","avatar_url":"https://github.com/targetcloud.png","language":"Swift","readme":"\u003cimg src=\"https://github.com/targetcloud/TGLabel/blob/master/Banners.png\" width = \"10%\" hight = \"10%\"/\u003e\n\n## TGLabel\n  \n一款可以根据传入的正则表达式自动匹配文本中的子文本对象，子文本对象按自定义方式显示和事件交互处理的UILabel。\n\n\u003cimg src=\"https://github.com/targetcloud/TGLabel/blob/master/屏幕快照%202017-06-20%20下午10.50.31.png\" width = \"40%\" hight = \"30%\"/\u003e\n\n![Build](https://img.shields.io/badge/build-passing-green.svg)\n![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)\n![Platform](https://img.shields.io/cocoapods/p/Pastel.svg?style=flat)\n![Cocoapod](https://img.shields.io/badge/pod-v0.0.7-blue.svg)\n![Swift](https://img.shields.io/badge/Swift-3.0-orange.svg)\n\n## Features\n- [x] 支持正则匹配子文本\n- [x] 支持文字改变时自适应高度\n\n## Usage\n\n```\n@IBOutlet weak var testLbl: TGLabel!\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n//        testLbl.autoresizingHeight = true\n        testLbl.text = \"TGLabel 感谢你使用TGLabel 欢迎你star/issue https://github.com/targetcloud/TGLabel\"\n    }\n\n    override func touchesBegan(_ touches: Set\u003cUITouch\u003e, with event: UIEvent?) {\n        testLbl.autoresizingHeight = true\n        testLbl.text = \"我变了，我真的变了，https://github.com/targetcloud/TGLabel https://github.com/targetcloud https://github.com\"\n    }\n```\n\n\n\u003cimg src=\"https://github.com/targetcloud/TGLabel/blob/master/屏幕快照%202017-06-20%20下午10.53.06.png\" width = \"40%\" hight = \"40%\"/\u003e\n\n\n### 可以配置的属性\n```\npatterns 正则\ndelegate 代理\nadjustCoefficient 选中时的高度调整系数\nautoresizingHeight 自适应高度\nselectedBackgroudColor 选中背景色\nlinkTextColor 选中色\ntext 文本\nattributedText 同上\nfont 字体\ntextColor 普通文本色\n```\n\n\n### 更多使用配置组合效果请下载本项目或fork本项目查看\n\n\n## Installation\n- 下载并拖动TGLabel到你的工程中\n\n- Cocoapods\n```\npod 'TGLabel'\n```\n\n\n## Reference\n- http://blog.csdn.net/callzjy\n\n\n## 运行效果\n![](https://github.com/targetcloud/TGLabel/blob/master/laebl.gif) \n\n如果你觉得赞，请Star\n\n\u003cimg src=\"https://github.com/targetcloud/TGLabel/blob/master/Banners.png\" width = \"10%\" hight = \"10%\"/\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftargetcloud%2Ftglabel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftargetcloud%2Ftglabel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftargetcloud%2Ftglabel/lists"}