{"id":19805769,"url":"https://github.com/remirobert/anim","last_synced_at":"2025-07-22T19:04:18.974Z","repository":{"id":21671852,"uuid":"24992862","full_name":"remirobert/Anim","owner":"remirobert","description":":eyes: Animation library, using Core Animation. Designed for iOS.","archived":false,"fork":false,"pushed_at":"2016-08-30T16:31:05.000Z","size":1540,"stargazers_count":85,"open_issues_count":2,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-01T06:37:31.147Z","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/remirobert.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":"2014-10-09T14:29:03.000Z","updated_at":"2025-02-23T23:10:40.000Z","dependencies_parsed_at":"2022-08-17T16:11:18.218Z","dependency_job_id":null,"html_url":"https://github.com/remirobert/Anim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/remirobert/Anim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FAnim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FAnim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FAnim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FAnim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remirobert","download_url":"https://codeload.github.com/remirobert/Anim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FAnim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266554095,"owners_count":23947263,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-11-12T09:05:12.411Z","updated_at":"2025-07-22T19:04:18.954Z","avatar_url":"https://github.com/remirobert.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Anim/master/ressources/logo.gif\"/\u003e\n  \u003ch1 align=\"center\"\u003eAnim\u003c/h1\u003e\n\u003c/p\u003e\n\n\nAnim allows you to use animations very easily. You can use it in your UIKit application for make smooth animations, using Swift. \n\n\n\u003ch1 align=\"center\"\u003eFeatures\u003c/h1\u003e\n\n - Position (CGPoint)\n - Bounce effect\n - Resize (CGSize)\n - Rotation\n - Rotation X\n - Rotation Y\n - Rotation Z\n - Fade\n - Border raduis\n - Move circle\n - Animations sequence\n - Repeat animations\n - Block completion\n \n\u003ch1 align=\"center\"\u003eHow to use it\u003c/h1\u003e\n\nYou can use Anim with all Layers (UIButton, UItableViewCell, UItextField, UIView, ...).\nAnim provides a extension for CALayer, for use animation: \n\n```Swift\nlet animation = Animation.movePosition(CGPointMake(30, 30), delay: 1.5)\nself.myView.layer.runAnimation(animation)\n```\n\u003chr\u003e\n\nYou can use the block completion for link animation\n\n```Swift\nlet resizeAnimation = Animation.resize(CGSizeMake(30, 30), delay: 1.5)\nlet bounceAnimation = Animation.bounce(30, delay: 0.1)\n\nself.myView.layer.runAnimation(resizeAnimation, blockCompletion: { () -\u003e () in\n  self.myView.layer.runAnimation(bounceAnimation)\n})\n```\n\u003chr\u003e\n\nYou can also use sequence of animations. All animations in a sequence will be executed one after the other.\n\n```Swift\nlet sequenceAnimation = Animation.sequenceAnimations([Animation.resize(CGSizeMake(30, 30), delay: 1.5),\n                                                      Animation.bounce(30, delay: 0.1)])\n\nself.myView.layer.runAnimation(sequenceAnimation)\n```\n\n\u003chr\u003e\n\nNow there is the repeat animation method. For infinite or count animation.\n\n```Swift\nlet move = Animation.sequenceAnimations([Animation.movePosition(CGPointMake(10, 10), delay: 1.5),\n                                         Animation.movePosition(CGPointMake(30, 30), delay: 1.5)])\nlet bounce = Animation.bounce(30, delay: 0.1)\n                                                      \nlet repeatBouceForEver = Animation.repeatAnimations(Repeat.Infinity, animationParam: bounce)\nlet repeatMove = Animation.repeatAnimations(Repeat.Count(10), animationParam: move)\n\nself.myView.layer.runAnimation(repeatBouceForEver)\nself.myView.layer.runAnimation(repeatMove)\n```\n\n\u003chr\u003e\n\nFor remove all current animation:\n\n```Swift\nself.myView.layer.removeAllAnimations()\n```\n\n\u003ch1 align=\"center\"\u003eExample\u003c/h1\u003e\n\nHere are some example of use:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Anim/master/ressources/record1.gif\"/\u003e\n\u003c/p\u003e\n\n\n```Swift\nlet animationStart = Animation.sequenceAnimations([Animation.resizeFrame(CGSizeMake(300, 300), delay: 2), Animation.rotationX(-0.85, delay: 2)])\n\n       \no.layer.runAnimation(animationStart, blockCompletion: { () -\u003e () in\n  self.l.layer.runAnimation(Animation.movePosition(CGPointMake(100, 100), delay: 2))\n  self.l.layer.runAnimation(Animation.resizeFrame(CGSizeMake(100, 100), delay: 2), blockCompletion: { () -\u003e () in\n\n    self.l2.layer.runAnimation(Animation.movePosition(CGPointMake(110, 110), delay: 2))\n    self.l2.layer.runAnimation(Animation.resizeFrame(CGSizeMake(80, 80), delay: 2), blockCompletion: { () -\u003e () in\n\n      self.l3.layer.runAnimation(Animation.movePosition(CGPointMake(120, 120), delay: 2))\n      self.l3.layer.runAnimation(Animation.resizeFrame(CGSizeMake(60, 60), delay: 2), blockCompletion: { () -\u003e () in\n                        \n        o.layer.runAnimation(Animation.rotationX(0.85, delay: 2), blockCompletion: { () -\u003e () in\n        })\n      })\n    })\n  })\n})\n\n```\n\u003chr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Anim/master/ressources/record2.gif\"/\u003e\n\u003c/p\u003e\n\n```Swift       \nlet a = Animation.repeatAnimations(Repeat.Count(3), animationParam: Animation.moveCircle(CGRectMake(0, 100, 200, 200), delay: 1))\nlet a2 = Animation.repeatAnimations(Repeat.Count(3), animationParam: Animation.moveCircle(CGRectMake(0, 100, 200, 200), delay: 1.5))\nlet a3 = Animation.repeatAnimations(Repeat.Count(3), animationParam: Animation.moveCircle(CGRectMake(0, 100, 200, 200), delay: 2))\n\nl.layer.runAnimation(a)\nl2.layer.runAnimation(a2)\nl3.layer.runAnimation(a3)\n```\n\n\u003chr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://raw.githubusercontent.com/remirobert/Anim/master/ressources/record3.gif\"/\u003e\n\u003c/p\u003e\n\n```Swift\nself.myImageView.layer.runAnimation(Animation.rotationY(Float(M_PI) * 4, delay: 2), blockCompletion: { () -\u003e () in\n  self.myImageView.layer.runAnimation(Animation.bounce(60, delay: 0.1))\n  self.myImageView.image = UIImage(named: \"otherImage\")\n})\n```\n\n\u003ch1 align=\"center\"\u003eAuthor\u003c/h1\u003e\nRémi ROBERT, remirobert33530@gmail.com\n\n\u003ch1 align=\"center\"\u003eLicence\u003c/h1\u003e\nAnim is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Fanim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremirobert%2Fanim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Fanim/lists"}