{"id":2397,"url":"https://github.com/shtnkgm/ImageTransition","last_synced_at":"2025-08-06T16:31:44.440Z","repository":{"id":56915380,"uuid":"149437976","full_name":"shtnkgm/ImageTransition","owner":"shtnkgm","description":"Library for smooth animation of images during transitions.","archived":true,"fork":false,"pushed_at":"2022-09-18T15:51:38.000Z","size":27215,"stargazers_count":220,"open_issues_count":1,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-08T14:02:38.863Z","etag":null,"topics":["animation","imagetransition","ios","swift"],"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/shtnkgm.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":"2018-09-19T11:08:27.000Z","updated_at":"2024-11-30T17:57:00.000Z","dependencies_parsed_at":"2022-08-20T21:20:11.810Z","dependency_job_id":null,"html_url":"https://github.com/shtnkgm/ImageTransition","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FImageTransition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FImageTransition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FImageTransition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FImageTransition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shtnkgm","download_url":"https://codeload.github.com/shtnkgm/ImageTransition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923713,"owners_count":17992568,"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","imagetransition","ios","swift"],"created_at":"2024-01-05T20:16:12.757Z","updated_at":"2024-12-09T16:31:08.358Z","avatar_url":"https://github.com/shtnkgm.png","language":"Swift","funding_links":[],"categories":["UI","Libs","UI [🔝](#readme)"],"sub_categories":["Transition","UI"],"readme":"# ImageTransition\n\n[![Cocoapods](https://img.shields.io/cocoapods/v/ImageTransition.svg)](https://github.com/shtnkgm/ImageTransition)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift Version](https://img.shields.io/badge/Swift-5.5-F16D39.svg)](https://developer.apple.com/swift)\n[![GitHub](https://img.shields.io/github/license/shtnkgm/ImageTransition.svg)](https://github.com/shtnkgm/ImageTransition/blob/master/LICENSE)\n\n**ImageTransition** is a library for smooth animation of images during transitions.\n\nSomething looks like below:\n\n|e.g. UIImageView|e.g. UIImageView in UICollectionView|\n|:---:|:---:|\n|\u003cimg src=\"https://github.com/shtnkgm/ImageTransition/raw/master/docs/assets/sample_01.gif\" alt=\"sample_01.gif\" width=\"200px\" /\u003e | \u003cimg src=\"https://github.com/shtnkgm/ImageTransition/raw/master/docs/assets/sample_02.gif\" alt=\"sample_02.gif\" width=\"200px\" /\u003e|\n\n## Feature\n - [x] Transition zooming animation like the iOS Photos app and the \"Pinterest\", and so on\n - [x] Easy to use (conform to `ImageTransitionable` protocol)\n - [x] Swifty (protocol-oriented)\n - [x] Animation configuration customizable (animation duration, UIView.AnimationOptions)\n - [x] CornerRadius animation (e.g. from a round image to a square Image)\n\n## Installation\n\n - Swift Package Manager: `https://github.com/shtnkgm/ImageTransition.git`\n - Carthage: `github \"shtnkgm/ImageTransition\"` \n - CocoaPods: `pod \"ImageTransition\"`\n\n## Usage\n\n - Confirm `ImageTransitionable` protocol\n```swift\n// Source UIViewController\nimport ImageTransition\nextension SourceViewController: ImageTransitionable {\n    var imageViewForTransition: UIImageView? {\n        return imageView\n    }\n}\n// Destination UIViewController\nimport ImageTransition\nextension DestinationViewController: ImageTransitionable {\n    var imageViewForTransition: UIImageView? {\n        return imageView\n    }\n}\n```\n - Set Delegate\n```swift\n    // present / dismiss transition\n    @objc private func imageViewDidTapped() {\n        let destinationViewController = DestinationViewController.make()\n        destinationViewController.transitioningDelegate = ImageTransitionDelegate.shared\n        present(destinationViewController, animated: true, completion: nil)\n    }\n\n    // push / pop transition\n    @objc private func imageViewDidTapped() {\n        let destinationViewController = DestinationViewController.make()\n        // Set ImageTransitionDelegate.shared to `delegate` property of UINavigationContoller\n        navigationController?.delegate = ImageTransitionDelegate.shared\n        navigationController?.pushViewController(destinationViewController, animated: true)\n    }\n```\n\n## Customize\n\nYou can customize the configuration of animation.\n\n```swift\nImageTransitionDelegate.shared.presentDuration = 0.5\nImageTransitionDelegate.shared.dismissDuration = 0.5\nImageTransitionDelegate.shared.pushDuration = 0.5\nImageTransitionDelegate.shared.popDuration = 0.5\nImageTransitionDelegate.shared.presentAnimationOptions = [.curveLinear]\nImageTransitionDelegate.shared.dismissAnimationOptions = [.curveEaseIn]\nImageTransitionDelegate.shared.pushAnimationOptions = [.curveLinear]\nImageTransitionDelegate.shared.popAnimationOptions = [.curveEaseIn]\n```\n\n## Requirements\n\n - iOS 14.0 or later\n\n## Contributing\n\nPull requests and stars are always welcome.\n\nFor bugs and feature requests, please create an issue.\n\n1. Fork it!\n2. Create your feature branch: git checkout -b my-new-feature\n3. Commit your changes: git commit -am 'Add some feature'\n4. Push to the branch: git push origin my-new-feature\n5. Submit a pull request :D\n\n## Author\n\n - [@shtnkgm](https://github.com/shtnkgm) / Shota Nakagami [![Twitter](https://img.shields.io/twitter/follow/shtnkgm?style=social)](https://twitter.com/shtnkgm)\n\n## License\n\nImageTransition is released under the MIT license. See [LICENSE](https://github.com/shtnkgm/ImageTransition/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshtnkgm%2FImageTransition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshtnkgm%2FImageTransition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshtnkgm%2FImageTransition/lists"}