{"id":2301,"url":"https://github.com/suguru/Cheetah","last_synced_at":"2025-08-02T23:32:54.082Z","repository":{"id":36818297,"uuid":"41125176","full_name":"suguru/Cheetah","owner":"suguru","description":"Easy animation library on iOS with Swift2","archived":false,"fork":false,"pushed_at":"2018-10-03T13:28:32.000Z","size":217,"stargazers_count":589,"open_issues_count":8,"forks_count":47,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-11-18T03:37:05.942Z","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/suguru.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-08-21T00:31:23.000Z","updated_at":"2024-10-22T13:11:48.000Z","dependencies_parsed_at":"2022-07-20T10:47:14.644Z","dependency_job_id":null,"html_url":"https://github.com/suguru/Cheetah","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suguru%2FCheetah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suguru%2FCheetah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suguru%2FCheetah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suguru%2FCheetah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suguru","download_url":"https://codeload.github.com/suguru/Cheetah/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.281Z","updated_at":"2024-12-06T17:30:58.534Z","avatar_url":"https://github.com/suguru.png","language":"Swift","funding_links":[],"categories":["UI","Swift","Libs","Animation"],"sub_categories":["Animation","Other free courses"],"readme":"Cheetah\n======\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg)](https://github.com/Carthage/Carthage)\n![Pod Version](https://img.shields.io/badge/Pod-0.4.1-blue.svg)\n![Swift Version](https://img.shields.io/badge/Swift-3.0-orange.svg)\n![License MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg)\n![Plaforms](https://img.shields.io/badge/Platform-iOS-lightgrey.svg)\n\nCheetah is an animation utility on iOS with Swift. Cheetah can animate any properties\nsince Cheetah uses simple CADisplayLink run loop to change animated properties.\n\nRequirements\n----\n\n- iOS 8.0~\n- tvOS 9.0~\n- Swift 3.0\n\nFeatures\n----\n\n- Animation with duration and delay\n- Changing with absolute/relative properties\n- Parallel/Serial executions\n- Easings\n- Springs\n\nCarthage\n----\n\nCarthage is a simple, decentralized dependency manager for Cocoa.\n\nTo install Cheetah, simply add the following line to your Cartfile:\n\n```\ngithub \"suguru/Cheetah\"\n```\n\nCode Example\n----\n\n```swift\n// Create view\nlet box = UIView(frame:CGRectMake(100,100,50,50))\nbox.backgroundColor = UIColor.blueColor()\nview.addSubview(box)\n\n// Move to 100px right\nbox.cheetah.move(100, 0).run()\n```\n\n![Simple move](https://suguru.github.io/Cheetah/images/simple_move.gif)\n\nProperties\n----\n\nCheetah has several methods to animate properties easily. You can also animate your own properties with extending CheetahProperty.\n\n- move\n- position (absolute of move)\n- scale\n- rotate\n- rotation (absolute of rotate)\n- size\n- frame\n- alpha\n- backgroundColor\n- textColor\n- borderColor\n- borderWidth\n- borderRadius\n- custom properties\n\nParallel execution\n----\n\nCheetah groups animation properties and execute them at once.\n\n```swift\nview.cheetah\n  .move(100, 0)\n  .rotate(M_PI * 2)\n  .scale(1.5)\n  .run()\n```\n\n![Parallel](https://suguru.github.io/Cheetah/images/parallel_move.gif)\n\nSerial execution\n----\n\n`wait` will wait until all animations placed before it completed.\nIt can also receive seconds to wait to start next animation.\n\n```swift\nview.cheetah\n  .move(100, 0).rotate(M_PI)\n  .wait()\n  .move(-100, 0).rotate(-M_PI)\n  .wait(1.0) // \u003c- wait 1 sec to start next animation\n  .move(0, -20).duration(0.4)\n  .wait()\n  .move(0, 20).duration(0.4)\n  .run()\n```\n\n![Serial](https://suguru.github.io/Cheetah/images/serial_move.gif)\n\nDuration and delay\n----\n\nCheetah has duration and delay to each animation properties.\n\n```swift\nview.cheetah\n  .move(100, 0).duration(1.0).delay(1.0)\n  .rotate(M_PI).duration(2.0)\n  .wait(1)\n  .move(-100, 0).duration(0.4)\n  .run()\n```\n\n![Delay](https://suguru.github.io/Cheetah/images/delay_move.gif)\n\nDuration will be copied from the property placed before.\n\n```swift\nview.cheetah\n  .duration(0.5)\n  .move(100, 0) // \u003c- will have 0.5 sec duration\n  .rotate(M_PI) // \u003c- will have 0.5 sec duration\n  .run()\n```\n\nRepeating\n----\n\nTo repeat animations, use `repeatCount(count: Int)`\n\n```swfit\nview.cheetah.rotate(M_PI_2).run().repeat(3)\n```\n\nTo repeat forever, use `forever`\n\n```swift\nview.cheetah.rotate(M_PI_2).run().forever\n```\n![Repeat](https://suguru.github.io/Cheetah/images/repeat_move.gif)\n\nEasings\n----\n\nCheetah supports various easing functions. You can also add custom easings with quad bezier points.\n\n![Easings](https://suguru.github.io/Cheetah/images/easings.gif)\n\nExmaple\n\n```swift\nview.cheetah.move(150, 150).easeInQuad.run()\n```\n\nSupported eassing equations\n\n- Linear\n- Sine\n- Quad\n- Quart\n- Quint\n- Circ\n- Cubic\n- Expo\n- Back\n- Bounce\n- Elastic\n\nSprings\n----\n\nCheetah supports spring dynamics with tension and friction parameters.\n\n![Springs](https://suguru.github.io/Cheetah/images/springs.gif)\n\nExample\n\n```swift\nview.cheetah\n  .move(200, 0)\n  .spring()\n  .run()\n\nview.cheetah\n  .move(200, 0)\n  .spring(tension: 100, friction: 4)\n  .run()\n```\n\nAnimate custom properties\n----\n\nYou can extend CheetahProperty to animate custom properties. You can refer CheetahViewProperties.swift and CheetahLayerProperties.swift.\n\n:)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuguru%2FCheetah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuguru%2FCheetah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuguru%2FCheetah/lists"}