{"id":15293531,"url":"https://github.com/edudnyk/labelkit","last_synced_at":"2025-04-13T14:07:19.920Z","repository":{"id":56919566,"uuid":"192812459","full_name":"edudnyk/LabelKit","owner":"edudnyk","description":"A UILabel that does true animation of attributed text.","archived":false,"fork":false,"pushed_at":"2021-10-10T10:59:00.000Z","size":128,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T14:07:13.694Z","etag":null,"topics":["animation","catextlayer","library","swift","uilabel"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edudnyk.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":"2019-06-19T22:30:05.000Z","updated_at":"2024-11-06T08:21:13.000Z","dependencies_parsed_at":"2022-08-20T21:50:26.468Z","dependency_job_id":null,"html_url":"https://github.com/edudnyk/LabelKit","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edudnyk%2FLabelKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edudnyk%2FLabelKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edudnyk%2FLabelKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edudnyk%2FLabelKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edudnyk","download_url":"https://codeload.github.com/edudnyk/LabelKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724636,"owners_count":21151561,"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":["animation","catextlayer","library","swift","uilabel"],"created_at":"2024-09-30T16:49:53.196Z","updated_at":"2025-04-13T14:07:19.898Z","avatar_url":"https://github.com/edudnyk.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![LabelKit](https://media.githubusercontent.com/media/edudnyk/LabelKit/master/LabelKit.gif)\n\n[![build status](https://travis-ci.org/edudnyk/LabelKit.svg)](https://travis-ci.org/edudnyk/LabelKit)\n[![cocoapods compatible](https://img.shields.io/badge/cocoapods-compatible-brightgreen.svg)](https://cocoapods.org/pods/LabelKit)\n[![carthage compatible](https://img.shields.io/badge/carthage-compatible-brightgreen.svg)](https://github.com/Carthage/Carthage)\n[![language](https://img.shields.io/badge/spm-compatible-brightgreen.svg)](https://swift.org)\n[![swift](https://img.shields.io/badge/swift-5.3-green.svg)](https://github.com/edudnyk/LabelKit/releases)\n\nA `UILabel` that does true animation of attributed text.\n\nIt animates all text attributes that are possible to animate, unlike  `CATextLayer` that animates only font and color.\n\nIt also has a great support of multiline text animations while keeping almost all the benefits of being `UILabel`.\n\nIt uses CoreText text rendering instead of CoreGraphics text rendering of `CATextLayer`. That makes the text to look the same by advancement and line height as the text in regular `UILabel`. \n\nIt is a great and simple building block for UI which implements material design.\n\n## Features\n- [x] [Documentation](https://edudnyk.github.io/LabelKit/index.html)\n- [x] Unit Test Coverage\n\n## Requirements\n\n![xcode](https://img.shields.io/badge/xcode-12%2b-lightgrey.svg)\n![ios](https://img.shields.io/badge/ios-12.0%2b-lightgrey.svg)\n![tvos](https://img.shields.io/badge/tvos-12.0%2b-lightgrey.svg)\n![mac os](https://img.shields.io/badge/mac%20os-10.15%2b-lightgrey.svg)\n\nInstallation \u003e\u003e [`instructions`](https://github.com/edudnyk/LabelKit/blob/master/INSTALL.md) \u003c\u003c\n\n## Usage\n\nYou can use either `LKLabel` or `LKLabelLayer`, both support implicitly animatable text change. \nWhen the layer is hosted by `LKLabel`, animations of text during bounds change are more stable.\n\nAnimating text change in `LKLabel` can be something like this:\n```swift\n// Swift\nself.label.superview.setNeedsLayout()\nself.label.setNeedsLayout()\nUIView.animate(withDuration: 3, delay: 0, options: [], animations: {\n    self.label.attributedText = attributedText\n    self.label.superview.layoutIfNeeded()\n}, completion: nil)\n```\n\n```objective-c\n// Objective-C\n[self.label.superview setNeedsLayout];\n[self.label setNeedsLayout];\n[UIView animateWithDuration:3 delay:0 options:kNilOptions animations:^{\n    self.label.attributedText = attributedText;\n    [self.label.superview layoutIfNeeded];\n} completion:nil];\n```\n\nAnimating text change in `LKLabelLayer` can be something like this:\n```swift\n// Swift\nCATransaction.begin()\nCATransaction.setAnimationDuration(3.0)\nlabelLayer.attributedText = attributedText\nCATransaction.commit()\n```\n\n```objective-c\n// Objective-C\n[CATransaction begin];\n[CATransaction setAnimationDuration:3.0];\nlabelLayer.attributedText = attributedText;\n[CATransaction commit];\n```\n\n\u003e Refer to the [`documentation`](https://edudnyk.github.io/LabelKit/index.html) for the detailed description of possibilities.\n\n## License\n\nLabelKit is released under the Simplified BSD license. See [LICENSE](https://github.com/edudnyk/LabelKit/blob/master/LICENSE) for details.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedudnyk%2Flabelkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedudnyk%2Flabelkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedudnyk%2Flabelkit/lists"}