{"id":15029214,"url":"https://github.com/marcosgriselli/viewanimator","last_synced_at":"2025-05-13T23:04:19.523Z","repository":{"id":37550098,"uuid":"106023615","full_name":"marcosgriselli/ViewAnimator","owner":"marcosgriselli","description":"ViewAnimator brings your UI to life with just one line","archived":false,"fork":false,"pushed_at":"2024-03-31T11:37:25.000Z","size":12305,"stargazers_count":7329,"open_issues_count":12,"forks_count":485,"subscribers_count":109,"default_branch":"master","last_synced_at":"2025-05-07T11:50:51.746Z","etag":null,"topics":["animations","ios","swift","ui","uicollectionview","uikit","uistackview","uitableview","uiview"],"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/marcosgriselli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-06T15:58:05.000Z","updated_at":"2025-05-04T16:37:19.000Z","dependencies_parsed_at":"2024-06-18T12:35:38.524Z","dependency_job_id":"8797d00d-cb42-422c-bbe1-456f61e5943f","html_url":"https://github.com/marcosgriselli/ViewAnimator","commit_stats":{"total_commits":134,"total_committers":17,"mean_commits":7.882352941176471,"dds":"0.15671641791044777","last_synced_commit":"55f1c46241b181c3e0b68d70edb6d87926c7d183"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FViewAnimator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FViewAnimator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FViewAnimator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FViewAnimator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosgriselli","download_url":"https://codeload.github.com/marcosgriselli/ViewAnimator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254040485,"owners_count":22004551,"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":["animations","ios","swift","ui","uicollectionview","uikit","uistackview","uitableview","uiview"],"created_at":"2024-09-24T20:09:58.461Z","updated_at":"2025-05-13T23:04:19.497Z","avatar_url":"https://github.com/marcosgriselli.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"./Resources/banner_new.svg\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-4.2-orange.svg\" /\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Platforms-iOS%20%7C%20tvOS-blue.svg?style=flat\" /\u003e\n        \u003cimg src=\"https://img.shields.io/cocoapods/dt/ViewAnimator.svg?style=flat\"/\u003e\n    \u003ca href=\"https://cocoapods.org/pods/ViewAnimator\"\u003e\n        \u003cimg src=\"https://img.shields.io/cocoapods/v/ViewAnimator.svg\" alt=\"CocoaPods\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat\" alt=\"Carthage\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codebeat.co/projects/github-com-marcosgriselli-viewanimator-master\"\u003e\n      \u003cimg src=\"https://codebeat.co/badges/633fb33d-66b6-4034-93c0-0f52c5d0e15c\" alt=\"Codebeat\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n      \u003cimg src=\"https://img.shields.io/cocoapods/l/ViewAnimator.svg?style=flat\" alt=\"License\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n**ViewAnimator** is a library for building complex iOS UIView animations in an easy way. It provides one line animations for any view included the ones which contain other views like UITableView and UICollectionView with its cells or UIStackView with its arrangedSubviews.\n\n### Entire View\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;UITableView\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;UICollectionView\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/ViewAnimator@cf065e96ac34c924710dd84c718ecd3be179ae37/Resources/entireView.svg\"/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/ViewAnimator@cf065e96ac34c924710dd84c718ecd3be179ae37/Resources/horizontal.svg\"/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/ViewAnimator@cf065e96ac34c924710dd84c718ecd3be179ae37/Resources/vertical.svg\"/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/ViewAnimator@cf065e96ac34c924710dd84c718ecd3be179ae37/Resources/collection.svg\"/\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/ViewAnimator@cf065e96ac34c924710dd84c718ecd3be179ae37/Resources/collectionX.svg\"/\u003e\n\nSVG animations inspired by [Luke Zhao's](http://lkzhao.com) project [Hero](https://github.com/lkzhao/Hero/blob/master/README.md)\n\n### Complex Layouts\n\u003cimage src=\"https://cdn.dribbble.com/users/702789/screenshots/3816087/preview-messaki.gif\" width=\"400\"/\u003e\n\nUI created by [Messaki](https://dribbble.com/messaki), make sure to check out his profile.\n\n*Logo and banner created by [@cintia_ve](https://twitter.com/cintia_ve)*\n\n## Installation\n\n### CocoaPods\n\nViewAnimator is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"ViewAnimator\"\n```\n\n### Manual\n\nDrop the swift files inside of [ViewAnimator/Classes](https://github.com/marcosgriselli/ViewAnimator/tree/master/ViewAnimator/Classes) into your project.\n\n### Carthage \n\n```\ngithub \"marcosgriselli/ViewAnimator\"\n```\n\n## Usage\n\n`ViewAnimator` provides a set of `UIView` extensions to easily add custom animations to your views. From version `2.0.0` there are two ways to use this extension. \n\n### Self animating views\n\nViews can animate theirselves calling `.animate(animations: [Animation])` that's the most basic usage. Here's the full method that contains many default arguments: \n\n```swift\nfunc animate(animations: [Animation],\n             reversed: Bool = false,\n             initialAlpha: CGFloat = 0.0,\n             finalAlpha: CGFloat = 1.0,\n             delay: Double = 0,\n             duration: TimeInterval = ViewAnimatorConfig.duration,\n             usingSpringWithDamping dampingRatio: CGFloat = ViewAnimatorConfig.springDampingRatio,\n             initialSpringVelocity velocity: CGFloat = ViewAnimatorConfig.initialSpringVelocity,\n             completion: (() -\u003e Void)? = nil)\n``` \n\n### Animating multiple views \n\nViewAnimator follows the UIKit animations API style with a static method  `UIView.animate(views: [UIView], animations: [Animation])`. This makes the library really easy to use and extensible to any kind of view. As the previous example, the method contains a lot of default arguments: \n\n```swift\nstatic func animate(views: [UIView],\n                    animations: [Animation],\n                    reversed: Bool = false,\n                    initialAlpha: CGFloat = 0.0,\n                    finalAlpha: CGFloat = 1.0,\n                    delay: Double = 0,\n                    animationInterval: TimeInterval = 0.05,\n                    duration: TimeInterval = ViewAnimatorConfig.duration,\n                    usingSpringWithDamping dampingRatio: CGFloat = ViewAnimatorConfig.springDampingRatio,\n                    initialSpringVelocity velocity: CGFloat = ViewAnimatorConfig.initialSpringVelocity,\n                    completion: (() -\u003e Void)? = nil)\n```\n\n### AnimationType\n\n#### Direction\n`Direction` provides the axis where the animation should take place and its movement direction.\n\n```swift\nlet animation = AnimationType.from(direction: .top, offset: 30.0)\nview.animate(animations: [animation])\n```\n\n#### Zoom\nZoom in and Zoom out animation support.\n\n```swift\nlet animation = AnimationType.zoom(scale: 0.5)\nview.animate(animations: [animation])\n```\n\n### Combined Animations\n\nYou can combine conformances of `Animation` to apply multiple transforms on your animation block. \n\n```swift \nlet fromAnimation = AnimationType.from(direction: .right, offset: 30.0)\nlet zoomAnimation = AnimationType.zoom(scale: 0.2)\nlet rotateAnimation = AnimationType.rotate(angle: CGFloat.pi/6)\nUIView.animate(views: collectionView.visibleCells,\n               animations: [zoomAnimation, rotateAnimation],\n               duration: 0.5)\nUIView.animate(views: tableView.visibleCells,\n               animations: [fromAnimation, zoomAnimation], \n               delay: 0.5)\n\n```\n\n## Animation\n\n`Animation` protocol provides you the posibility of expanding the animations supported by `ViewAnimator` with exception of the `animateRandom` function.\n\n```swift \npublic protocol Animation {\n    var initialTransform: CGAffineTransform { get }\n}\n```\n\n## UITableView/UICollection extensions\n\nViewAnimator comes with a set of handy extensions to make your animations in `UITableView` and `UICollectionView` a lot simpler. They both have access to cells in a section to animate easily. \n\nThey both expose a method `visibleCells(in section: Int)` that returns an array of `UITableViewCell` or `UICollectionViewCell`.\n\n```swift\nlet cells = tableView.visibleCells(in: 1)\nUIView.animate(views: cells, animations: [rotateAnimation, fadeAnimation])\n``` \n\n## Mentions\n\n- [iOS Dev Weekly 323](http://iosdevweekly.com/issues/323#start)\n- [Natasha The Robot's Newsleter 147](https://swiftnews.curated.co/issues/147#start)\n- [Top 10 Swift Articles October](https://medium.mybridge.co/swift-top-10-articles-for-the-past-month-v-oct-2017-4e0f1bd031e8)\n- [30 Amazing iOS Swift Libraries (v2018)](https://medium.mybridge.co/30-amazing-ios-swift-libraries-for-the-past-year-v-2018-7cf15027eee9)\n\n\n## Project Details\n\n### Requirements\n* Swift 4.0\n* Xcode 7.0+\n* iOS 8.0+\n\n### Contributing\nFeel free to collaborate with ideas 💭, issues ⁉️ and/or pull requests 🔃.\n\nIf you use ViewAnimator in your app I'd love to hear about it and feature your animation here!\n\n### Contributors\n\n[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/0)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/0)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/1)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/1)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/2)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/2)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/3)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/3)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/4)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/4)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/5)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/5)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/6)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/6)[![](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/images/7)](https://sourcerer.io/fame/marcosgriselli/marcosgriselli/ViewAnimator/links/7)\n\n### Author\n\nMarcos Griselli | \u003ca href=\"url\"\u003e\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/ViewAnimator@cf065e96ac34c924710dd84c718ecd3be179ae37/Resources/twitterLogo.svg\" height=\"17\"\u003e\u003c/a\u003e [@marcosgriselli](https://twitter.com/marcosgriselli)\n\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/marcosgriselli.svg?style=social)](https://twitter.com/marcosgriselli)\n\n[![Twitter Follow](https://img.shields.io/github/followers/marcosgriselli.svg?style=social\u0026label=Follow)](https://github.com/marcosgriselli)\n\n### License\n\nViewAnimator is available under the MIT license. See the [LICENSE](https://github.com/marcosgriselli/ViewAnimator/blob/master/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosgriselli%2Fviewanimator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosgriselli%2Fviewanimator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosgriselli%2Fviewanimator/lists"}