{"id":2323,"url":"https://github.com/Antondomashnev/ADPuzzleAnimation","last_synced_at":"2025-08-02T23:32:57.856Z","repository":{"id":56921503,"uuid":"51201510","full_name":"Antondomashnev/ADPuzzleAnimation","owner":"Antondomashnev","description":"Inspired by Fabric - Answers animation. Allows to \"build\" given view with pieces. Allows to \"destroy\" given view into pieces","archived":false,"fork":false,"pushed_at":"2016-06-19T09:36:17.000Z","size":9077,"stargazers_count":124,"open_issues_count":0,"forks_count":13,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-29T19:42:32.103Z","etag":null,"topics":["animation","answers-animation","carthage","cocoapods","puzzle"],"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/Antondomashnev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.yml","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":"2016-02-06T12:24:31.000Z","updated_at":"2024-01-19T22:32:13.000Z","dependencies_parsed_at":"2022-08-21T04:50:45.522Z","dependency_job_id":null,"html_url":"https://github.com/Antondomashnev/ADPuzzleAnimation","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antondomashnev%2FADPuzzleAnimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antondomashnev%2FADPuzzleAnimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antondomashnev%2FADPuzzleAnimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antondomashnev%2FADPuzzleAnimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Antondomashnev","download_url":"https://codeload.github.com/Antondomashnev/ADPuzzleAnimation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503177,"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":["animation","answers-animation","carthage","cocoapods","puzzle"],"created_at":"2024-01-05T20:16:10.872Z","updated_at":"2024-12-06T17:30:59.232Z","avatar_url":"https://github.com/Antondomashnev.png","language":"Swift","funding_links":[],"categories":["UI","Animation"],"sub_categories":["Animation","Other free courses"],"readme":"# ADPuzzleAnimation\n\n![](https://travis-ci.org/Antondomashnev/ADPuzzleAnimation.svg?branch=master)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/PuzzleAnimation.svg)](https://img.shields.io/cocoapods/v/PuzzleAnimation.svg)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![codebeat badge](https://codebeat.co/badges/3b267dd9-2ac9-4264-8415-2f4c22e88f9a)](https://codebeat.co/projects/github-com-antondomashnev-adpuzzleanimation)\n\n## Whats inside\nCustom animation for UIView inspired by Fabric - Answers animation.\n\n\u003cimg src=\"http://i.giphy.com/u1rehLIHD822I.gif\" width=\"320\" /\u003e \u003cimg src=\"http://i.giphy.com/5cdjNOUroagwM.gif\" width=\"320\" /\u003e \u003cimg src=\"http://i.giphy.com/10h7RbGYReryNO.gif\" width=\"320\" /\u003e \u003cimg src=\"http://i.giphy.com/iXlkj9HtB6FHO.gif\" width=\"320\" /\u003e\n\n## Easy to use\n\nTo create your first animation you need to know only about one method:\n\n```swift\n/**\n Designated initializer for puzzle animation and it's subclasses\n \n - parameter viewToAnimate: view to render into pieces\n - parameter configuration: animation configuration\n \n - returns: newly created animation instance\n */\ninit(viewToAnimate: UIView, configuration: PuzzleAnimationConfiguration = PuzzleAnimationConfiguration())\n```\n   \nIt's flixible - you can configure almost any parameter for the animation:\n    \n```swift\n/**\n *  Defines the structure that contains configurable parameters for puzzle animation\n*/\nstruct PuzzleAnimationConfiguration {\n\n  /// Defines the animation velocity. Higher velocity less animation duration\n  var animationVelocity: NSTimeInterval = 1\n\n  /// Defines the delay between each piece in piece's group animation\n  var pieceAnimationDelay: PuzzleAnimationDelay = defaultForwardPieceAnimationDelay\n\n  /// Defines the delay between each group of pieces animation\n  var pieceGroupAnimationDelay: PuzzleAnimationDelay = defaultForwardPieceGroupAnimationDelay\n\n  /// Defines the animation piece's scale\n  var animationScale: Double = 2.5\n\n  /// Each piece represents square and this value represents the number of pixels of square side\n  var pieceSide: CGFloat = 40\n}\n```\n\nHandle callbacks about status to start new animation or do something else:\n```swift\n/// Called when animation completed, stoped or failed\n/// @note You can set it any time even during the animation\npublic var animationCompletion: PuzzleAnimationCompletion?\n```\n\nIntuitive and simple interface:\n```swift\n/**\n Starts the animation. Makes view to animate hidden\n*/\npublic func start()\n    \n/**\n Stops the animation. Removes all pieces from superview. Makes view to animate visible\n */\npublic func stop()\n```\n    \nFor the complete example check the viewController.swift\n\n## Easy to install\n\n### CocoaPods\n\nTo integrate ADPuzzleAnimation into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\nuse_frameworks!\n\npod 'PuzzleAnimation', '~\u003e 1.1.1'\n```\n### Carthage\n\nTo integrate ADPuzzleAnimation into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"Antondomashnev/ADPuzzleAnimation\" ~\u003e 1.1.1\n```\n\nRun `carthage update` to build the framework and drag the built `ADPuzzleAnimation.framework` into your Xcode project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAntondomashnev%2FADPuzzleAnimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAntondomashnev%2FADPuzzleAnimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAntondomashnev%2FADPuzzleAnimation/lists"}