{"id":24383000,"url":"https://github.com/space-code/transitions","last_synced_at":"2026-07-10T05:31:08.626Z","repository":{"id":272292872,"uuid":"747624459","full_name":"space-code/transitions","owner":"space-code","description":"Transitions is a modern, lightweight Swift framework that simplifies the creation of custom view controller transitions for iOS.","archived":false,"fork":false,"pushed_at":"2026-07-06T23:44:57.000Z","size":97,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-07-07T01:12:35.356Z","etag":null,"topics":["custom-transitions","swift","transitions","uikit"],"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/space-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-24T10:09:14.000Z","updated_at":"2026-07-06T23:44:47.000Z","dependencies_parsed_at":"2025-01-13T14:43:54.655Z","dependency_job_id":null,"html_url":"https://github.com/space-code/transitions","commit_stats":null,"previous_names":["space-code/transitions"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/space-code/transitions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Ftransitions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Ftransitions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Ftransitions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Ftransitions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-code","download_url":"https://codeload.github.com/space-code/transitions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Ftransitions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35322488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["custom-transitions","swift","transitions","uikit"],"created_at":"2025-01-19T10:11:58.541Z","updated_at":"2026-07-10T05:31:08.620Z","avatar_url":"https://github.com/space-code.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# transitions\n\n\u003ch1 align=\"center\" style=\"margin-top: 0px;\"\u003etransitions\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/space-code/transitions/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/space-code/transitions?style=flat\"\u003e\u003c/a\u003e \n\u003ca href=\"https://swiftpackageindex.com/space-code/transitions\"\u003e\u003cimg alt=\"Swift Compatibility\" src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Ftransitions%2Fbadge%3Ftype%3Dswift-versions\"/\u003e\u003c/a\u003e \n\u003ca href=\"https://swiftpackageindex.com/space-code/transitions\"\u003e\u003cimg alt=\"Platform Compatibility\" src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Ftransitions%2Fbadge%3Ftype%3Dplatforms\"/\u003e\u003c/a\u003e \n\u003ca href=\"https://github.com/space-code/transitions\"\u003e\u003cimg alt=\"CI\" src=\"https://github.com/space-code/transitions/actions/workflows/ci.yml/badge.svg?branch=main\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/apple/swift-package-manager\" alt=\"transitions on Swift Package Manager\" title=\"transitions on Swift Package Manager\"\u003e\u003cimg src=\"https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Description\nTransitions is a modern, lightweight Swift framework that simplifies the creation of custom view controller transitions for iOS. Built to reduce boilerplate and enhance code clarity, it provides an elegant API for crafting beautiful presentation and dismissal animations with minimal effort.\n\n## Features\n\n✨ **Simple API** - Clean, intuitive interface for custom transitions  \n🎨 **Flexible Animations** - Full control over presentation and dismissal  \n🎯 **Type-Safe** - Leverages Swift's type system for compile-time safety  \n🔧 **Customizable** - Tailor transitions to match your app's unique style  \n📱 **iOS Native** - Built specifically for iOS with UIKit best practices  \n⚡ **Lightweight** - Minimal footprint with zero dependencies  \n\n## Table of Contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Usage](#usage)\n  - [Creating a Custom Transition](#creating-a-custom-transition)\n  - [Applying Transitions](#applying-transitions)\n- [Common Use Cases](#common-use-cases)\n- [Communication](#communication)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n  - [Development Setup](#development-setup)\n- [Author](#author)\n- [License](#license)\n\n## Requirements\n\n| Platform  | Minimum Version |\n|-----------|----------------|\n| iOS       | 12.0+          |\n| Xcode     | 15.3+          |\n| Swift     | 5.10+           |\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following dependency to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/space-code/transitions.git\", from: \"1.1.0\")\n]\n```\n\nOr add it through Xcode:\n\n1. File \u003e Add Package Dependencies\n2. Enter package URL: `https://github.com/space-code/transitions.git`\n3. Select version requirements\n\n## Quick Start\n\n```swift\nimport Transitions\n\n// Create your custom transition\nfinal class ZoomTransition: CustomTransition {\n    // Implement your custom animation logic\n}\n\n// Apply it to a view controller\nlet viewController = UIViewController()\nviewController.customTransition = ZoomTransition()\n\n// Present with your custom transition\npresent(viewController, animated: true)\n```\n\n## Usage\n\n### Creating a Custom Transition\n\nTransitions makes it easy to create custom animations by conforming to the `CustomTransition` protocol:\n\n```swift\nimport Transitions\nimport UIKit\n\nfinal class FadeTransition: CustomTransition {\n    override func animateTransition(\n        using transitionContext: UIViewControllerContextTransitioning\n    ) {\n        \n        super.animateTransition(using: transitionContext)\n        \n        let containerView = transitionContext.containerView\n        \n        guard let animatingView = isPresenting ?\n                transitionContext.view(forKey: .to) :\n                    transitionContext.view(forKey: .from)\n        else {\n            transitionContext.completeTransition(false)\n            return\n        }\n        \n        if isPresenting {\n            animatingView.alpha = 0\n            containerView.addSubview(animatingView)\n        }\n        \n        let finalAlpha: CGFloat = isPresenting ? 1.0 : 0.0\n        \n        UIView.animate(\n            withDuration: transitionDuration,\n            animations: {\n                animatingView.alpha = finalAlpha\n            },\n            completion: { finished in\n                self.completeTransaction()\n            }\n        )\n    }\n}\n```\n\n### Applying Transitions\n\nOnce you've created your custom transition, applying it is straightforward:\n\n```swift\nimport Transitions\n\nlet detailViewController = DetailViewController()\ndetailViewController.customTransition = FadeTransition()\n\npresent(detailViewController, animated: true)\n```\n\n## Common Use Cases\n\n### Zoom Transition\n\n```swift\nimport Transitions\nimport UIKit\n\nfinal class ZoomTransition: CustomTransition {\n    override func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {\n        super.animateTransition(using: transitionContext)\n        \n        if isPresenting {\n            animatePresentation(using: transitionContext)\n        } else {\n            animateDismissal(using: transitionContext)\n        }\n    }\n    \n    // MARK: - Private Methods\n    \n    private func animatePresentation(using transitionContext: UIViewControllerContextTransitioning) {\n        guard let toView = transitionContext.view(forKey: .to) else {\n            transitionContext.completeTransition(false)\n            return\n        }\n        \n        let containerView = transitionContext.containerView\n\n        toView.transform = CGAffineTransform(scaleX: 0.1, y: 0.1)\n        toView.alpha = 0\n        containerView.addSubview(toView)\n        \n        UIView.animate(\n            withDuration: transitionDuration,\n            delay: 0,\n            usingSpringWithDamping: 0.7,\n            initialSpringVelocity: 0.5,\n            options: .curveEaseInOut,\n            animations: {\n                toView.transform = .identity\n                toView.alpha = 1.0\n            },\n            completion: { _ in\n                self.completeTransaction()\n            }\n        )\n    }\n    \n    private func animateDismissal(using transitionContext: UIViewControllerContextTransitioning) {\n        guard let fromView = transitionContext.view(forKey: .from) else {\n            transitionContext.completeTransition(false)\n            return\n        }\n        \n        UIView.animate(\n            withDuration: transitionDuration,\n            animations: {\n                fromView.transform = CGAffineTransform(scaleX: 0.1, y: 0.1)\n                fromView.alpha = 0\n            },\n            completion: { _ in\n                self.completeTransaction()\n            }\n        )\n    }\n}\n```\n\n### Slide Transition\n\n```swift\nimport Transitions\nimport UIKit\n\nfinal class SlideTransition: CustomTransition {\n    override func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {\n        super.animateTransition(using: transitionContext)\n        \n        if isPresenting {\n            animatePresentation(using: transitionContext)\n        } else {\n            animateDismissal(using: transitionContext)\n        }\n    }\n    \n    // MARK: - Private Methods\n    \n    private func animatePresentation(using transitionContext: UIViewControllerContextTransitioning) {\n        guard let toView = transitionContext.view(forKey: .to) else {\n            transitionContext.completeTransition(false)\n            return\n        }\n        \n        let containerView = transitionContext.containerView\n        let finalFrame = transitionContext.finalFrame(for: transitionContext.viewController(forKey: .to)!)\n\n        toView.frame = finalFrame.offsetBy(dx: finalFrame.width, dy: 0)\n        containerView.addSubview(toView)\n        \n        UIView.animate(\n            withDuration: animationDuration,\n            delay: 0,\n            options: .curveEaseOut,\n            animations: {\n                toView.frame = finalFrame\n            },\n            completion: { _ in\n                self.completeTransaction()\n            }\n        )\n    }\n    \n    private func animateDismissal(using transitionContext: UIViewControllerContextTransitioning) {\n        guard let fromView = transitionContext.view(forKey: .from) else {\n            transitionContext.completeTransition(false)\n            return\n        }\n        \n        UIView.animate(\n            withDuration: animationDuration,\n            delay: 0,\n            options: .curveEaseIn,\n            animations: {\n                fromView.frame = fromView.frame.offsetBy(dx: fromView.frame.width, dy: 0)\n            },\n            completion: { _ in\n                self.completeTransaction()\n            }\n        )\n    }\n}\n```\n\n## Communication\n\n- 🐛 **Found a bug?** [Open an issue](https://github.com/space-code/transitions/issues/new)\n- 💡 **Have a feature request?** [Open an issue](https://github.com/space-code/transitions/issues/new)\n- ❓ **Questions?** [Start a discussion](https://github.com/space-code/transitions/discussions)\n- 🔒 **Security issue?** Email nv3212@gmail.com\n\n## Documentation\n\nComprehensive documentation is available: [Transitions Documentation](https://space-code.github.io/transitions/)\n\n## Contributing\n\nWe love contributions! Please feel free to help out with this project. If you see something that could be made better or want a new feature, open up an issue or send a Pull Request.\n\n### Development Setup\n\nBootstrap the development environment:\n\n```bash\nmise install\n```\n\n## Author\n\n**Nikita Vasilev**\n- Email: nv3212@gmail.com\n- GitHub: [@ns-vasilev](https://github.com/ns-vasilev)\n\n## License\n\nTransitions is released under the MIT license. See [LICENSE](https://github.com/space-code/transitions/blob/main/LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[⬆ back to top](#transitions)**\n\nMade with ❤️ by [space-code](https://github.com/space-code)\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-code%2Ftransitions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-code%2Ftransitions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-code%2Ftransitions/lists"}