{"id":2309,"url":"https://github.com/alikaragoz/DaisyChain","last_synced_at":"2025-08-02T23:32:55.697Z","repository":{"id":56908188,"uuid":"48009847","full_name":"alikaragoz/DaisyChain","owner":"alikaragoz","description":":link: Easy animation chaining","archived":true,"fork":false,"pushed_at":"2017-10-04T15:41:22.000Z","size":28,"stargazers_count":31,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T14:46:53.011Z","etag":null,"topics":[],"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/alikaragoz.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":"2015-12-15T00:32:36.000Z","updated_at":"2023-10-27T08:09:58.000Z","dependencies_parsed_at":"2022-08-21T03:50:24.438Z","dependency_job_id":null,"html_url":"https://github.com/alikaragoz/DaisyChain","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikaragoz%2FDaisyChain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikaragoz%2FDaisyChain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikaragoz%2FDaisyChain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alikaragoz%2FDaisyChain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alikaragoz","download_url":"https://codeload.github.com/alikaragoz/DaisyChain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503176,"owners_count":17930527,"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-01-05T20:16:10.491Z","updated_at":"2024-12-06T17:30:59.015Z","avatar_url":"https://github.com/alikaragoz.png","language":"Swift","funding_links":[],"categories":["UI","Animation"],"sub_categories":["Animation","Other free courses"],"readme":"[![Build Status](https://travis-ci.org/alikaragoz/DaisyChain.svg?branch=master)](https://travis-ci.org/alikaragoz/DaisyChain)\n[![Version](http://img.shields.io/cocoapods/v/DaisyChain.svg)](http://cocoapods.org/?q=DaisyChain)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n\nDaisyChain\n----------\n\n**DaisyChain** is a micro framework which makes UIView animations chaining dead simple. It uses the exact same interface you are familiars with.\n\n#### Chaining made simple\nWe all have seen or written code which looks like this:\n\n```swift\nUIView.animateWithDuration(0.5, animations: {\n  view.center = CGPointMake(0.0, 0.0)\n  }) { _ in\n    UIView.animateWithDuration(0.5, animations: {\n      view.center = CGPointMake(100.0, 0.0)\n      }) { _ in\n        UIView.animateWithDuration(0.5, animations: {\n          view.center = CGPointMake(100.0, 100.0)\n          }) { _ in\n            UIView.animateWithDuration(0.5, animations: {\n              view.center = CGPointMake(0.0, 100.0)\n              }) { _ in\n                UIView.animateWithDuration(0.5, animations: {\n                  view.center = CGPointMake(0.0, 0.0)\n                })\n            }\n        }\n    }\n}\n```\n\nThis can go pretty far, it is also know as the *callback hell*. It's not very flexible and hard to read.\n\nWith **DaisyChain** the above code looks like this:\n\n```swift\nlet chain = DaisyChain()\n\nchain.animateWithDuration(0.5, animations: {\n  view.center = CGPointMake(0.0, 0.0)\n})\n\nchain.animateWithDuration(0.5, animations: {\n  view.center = CGPointMake(100.0, 0.0)\n})\n\nchain.animateWithDuration(0.5, animations: {\n  view.center = CGPointMake(100.0, 100.0)\n})\n\nchain.animateWithDuration(0.5, animations: {\n  view.center = CGPointMake(0.0, 100.0)\n})\n\nchain.animateWithDuration(0.5, animations: {\n  view.center = CGPointMake(0.0, 0.0)\n})\n```\n\nAs you can the the code looks more flat, it allows you to easy modify orders or add new steps.\n\n#### Breakable chains\n\n**DaisyChain** also adds a simple way to break animation sequences, simply set the `broken` property to `yes` to break a chain:\n```swift\nchain.broken = true\n```\n\nTo continue chaining animation, you'll need to put it back to `false` or create a new chain.\n\n#### Setting up with CocoaPods\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\nuse_frameworks!\n\npod 'DaisyChain', '~\u003e 1.0.0'\n```\n\n#### Setting up with Carthage\n\n```ogdl\ngithub \"alikaragoz/DaisyChain\" ~\u003e 1.0.0\n```\n\n#### License\n\nDaisyChain is available under the [MIT license](https://github.com/alikaragoz/DaisyChain/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falikaragoz%2FDaisyChain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falikaragoz%2FDaisyChain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falikaragoz%2FDaisyChain/lists"}