{"id":20026707,"url":"https://github.com/hlfcoding/anime","last_synced_at":"2025-10-09T20:12:12.754Z","repository":{"id":56902028,"uuid":"91109222","full_name":"hlfcoding/Anime","owner":"hlfcoding","description":":film_strip: UIView animation from the Far East","archived":false,"fork":false,"pushed_at":"2018-12-27T09:48:45.000Z","size":137,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-11T10:03:08.219Z","etag":null,"topics":["animation","ios","swift"],"latest_commit_sha":null,"homepage":"","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/hlfcoding.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-05-12T16:16:30.000Z","updated_at":"2018-12-27T09:48:47.000Z","dependencies_parsed_at":"2022-08-20T18:10:10.732Z","dependency_job_id":null,"html_url":"https://github.com/hlfcoding/Anime","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hlfcoding/Anime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfcoding%2FAnime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfcoding%2FAnime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfcoding%2FAnime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfcoding%2FAnime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlfcoding","download_url":"https://codeload.github.com/hlfcoding/Anime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlfcoding%2FAnime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002017,"owners_count":26083258,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","ios","swift"],"created_at":"2024-11-13T09:07:36.776Z","updated_at":"2025-10-09T20:12:12.711Z","avatar_url":"https://github.com/hlfcoding.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anime\n\n[![Version](https://img.shields.io/cocoapods/v/Anime.svg?style=flat)](http://cocoapods.org/pods/Anime)\n[![License](https://img.shields.io/cocoapods/l/Anime.svg?style=flat)](http://cocoapods.org/pods/Anime)\n[![Platform](https://img.shields.io/cocoapods/p/Anime.svg?style=flat)](http://cocoapods.org/pods/Anime)\n[![Code Climate](https://codeclimate.com/github/hlfcoding/Anime/badges/gpa.svg)](https://codeclimate.com/github/hlfcoding/Anime)\n\n\u003e :film_strip: \u0026nbsp; UIView animation from the Far East.\n\n![anime](https://cloud.githubusercontent.com/assets/100884/25989526/5c303b94-36b1-11e7-90d6-610694124c1d.gif)\n\n## Example\n\n```swift\nlet a = Animation(of: { view.frame.origin.x += 10 }, duration: 1)\nlet b = a.with(animations: { view.frame.origin.x -= 10 })\nlet timeline = AnimationTimeline(a, b, b, a).start() { (finished) in\n  guard finished else {\n    // ...\n    return\n  }\n  print(\"done\")\n}\n// ...\ntimeline.needsToCancel = true\n```\n\nCompare the above 10 lines with the below 30 lines:\n\n```swift\nvar isCancelled = false\nlet handleCancelled = {\n  // ...\n}\nlet a = { view.frame.origin.x += 10 }\nlet b = { view.frame.origin.x -= 10 }\nlet start = {\n  UIView.animate(withDuration: 1, animations: a) { _ in\n    if isCancelled {\n      handleCancelled()\n      return\n    }\n    UIView.animate(withDuration: 1, animations: b) { _ in\n      if isCancelled {\n        handleCancelled()\n        return\n      }\n      UIView.animate(withDuration: 1, animations: b) { _ in\n        if isCancelled {\n          handleCancelled()\n          return\n        }\n        UIView.animate(withDuration: 1, animations: a) { _ in\n          print(\"done\")\n        }\n      }\n    }\n  }\n}\nstart()\n// ...\nisCancelled = true\n```\n\nAnimations can also be configured more flexibly, and appended in-flight:\n\n```swift\nvar z = b\nz.animations = { /* ... */ }\nz.type = .keyframed(options: [])\n// ...\ntimeline.append(z)\n```\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\nSwift 4+\n\n## Installation\n\nAnime is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"Anime\"\n```\n\n## Author\n\nPeng Wang, peng@pengxwang.com\n\n## License\n\nAnime is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlfcoding%2Fanime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlfcoding%2Fanime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlfcoding%2Fanime/lists"}