{"id":28754494,"url":"https://github.com/kovs705/notchtransition","last_synced_at":"2025-07-10T08:38:12.525Z","repository":{"id":295596262,"uuid":"990317923","full_name":"kovs705/NotchTransition","owner":"kovs705","description":"Custom transition from the notch ","archived":false,"fork":false,"pushed_at":"2025-05-27T14:08:07.000Z","size":456,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T01:11:15.784Z","etag":null,"topics":[],"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/kovs705.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2025-05-25T23:46:29.000Z","updated_at":"2025-05-30T22:07:45.000Z","dependencies_parsed_at":"2025-05-29T16:05:12.274Z","dependency_job_id":null,"html_url":"https://github.com/kovs705/NotchTransition","commit_stats":null,"previous_names":["kovs705/notchtransition"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kovs705/NotchTransition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovs705%2FNotchTransition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovs705%2FNotchTransition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovs705%2FNotchTransition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovs705%2FNotchTransition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kovs705","download_url":"https://codeload.github.com/kovs705/NotchTransition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovs705%2FNotchTransition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264551749,"owners_count":23626556,"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":[],"created_at":"2025-06-17T01:09:38.784Z","updated_at":"2025-07-10T08:38:12.455Z","avatar_url":"https://github.com/kovs705.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"300\" height=\"330\" src=\"/Assets/NotchTransition.png\" alt=\"\"\u003e\n  \u003ch1\u003e\u003cb\u003eNotchTransition\u003c/b\u003e\u003c/h1\u003e\n  \u003cp\u003e\n    \u003cb\u003eLibrary for custom navigation transition from the iPhone's notch\u003c/b\u003e\n    \u003cbr\u003e\n    \u003ci\u003eCompatible with iOS 16.4 and later\u003c/i\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://swift.org\"\u003e\n\u003c!--     \u003cimg src=\"https://img.shields.io/badge/Swift-5.9%20%7C%206-orange.svg\" alt=\"Swift Version\"\u003e --\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-5.9-orange.svg\" alt=\"Swift Version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.apple.com/ios/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/iOS-16.4%2B-blue.svg\" alt=\"iOS\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-green.svg\" alt=\"License: MIT\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## Features\n\n- 🏝️ **Adaptive Design**: Automatically detects and adapts to different iPhone models (Dynamic Island, Notch, or older devices)\n- 📱 **Universal Support**: Works on all iPhone models and iPad\n- ⚡ **Smooth Animations**: Bouncy, fluid animations with customizable timing\n- 🎨 **Themeable**: Support for custom colors, materials, and backgrounds\n- 🛠️ **Configurable**: Multiple preset configurations (default, slow) and full customization\n- 📦 **Easy Integration**: Simple SwiftUI view modifier for quick implementation\n- 🔧 **iOS 16+**: Built for modern iOS with SwiftUI best practices\n\n## Device Support\n\n| Device Type | Screen Sizes | Animation Adaptation |\n|-------------|--------------|---------------------|\n| **Dynamic Island** | iPhone 14 Pro, 15 series, 16 series | Native Dynamic Island dimensions |\n| **Notch** | iPhone X, XS, 11, 12, 13 series | Scaled notch dimensions |\n| **No Notch** | iPhone SE, 8, 7 and older | Simulated island effect |\n| **iPad** | All iPad models | Larger dimensions for tablet |\n\n## Installation\n\n### Swift Package Manager\n\nAdd the following to your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/kovs705/NotchTransition.git\", branch: \"main\")\n]\n```\n\nOr add it through Xcode:\n1. File → Add Package Dependencies\n2. Enter the repository URL\n3. Select the version and add to your target\n\n## Quick Start\n\n### Basic Usage\n\n```swift\nimport SwiftUI\nimport NotchTransition\n\nstruct ContentView: View {\n\n    /// One bool stands for animation of transition + presenting view, if `false` - screen dismisses\n    @State private var showTransition = false\n    \n    var body: some View {\n        Button(\"Show Transition\") {\n            showTransition = true\n        }\n        .notchTransition(isPresented: $showTransition) {\n            VStack {\n                Text(\"Hello from Dynamic Island!\")\n                    .foregroundColor(.white)\n                \n                Button(\"Close\") {\n                    showTransition = false\n                }\n                .buttonStyle(.borderedProminent)\n            }\n        }\n    }\n}\n```\n\n### Predefined Configurations\n\n// Slow animation\n.notchTransitionSlow(isPresented: $showSlow) {\n    SlowContent()\n}\n\n// Themed with custom colors\n.notchTransition(\n    isPresented: $showThemed,\n    backgroundColor: .purple,\n    material: .ultraThinMaterial\n) {\n    ThemedContent()\n}\n```\n\n### Custom Configuration\n\n```swift\nlet customConfig = TransitionConfiguration(\n    animationTimings: TransitionConfiguration.AnimationTimings(\n        initial: 0.1,\n        notchToRectangle: 1.2,\n        rectangleToFullscreen: 0.8,\n        contentAppearance: 0.5\n    ),\n    backgroundColor: .indigo,\n    backgroundMaterial: .regularMaterial\n)\n\n.notchTransition(\n    isPresented: $showCustom,\n    configuration: customConfig\n) {\n    CustomContent()\n}\n```\n\n## Configuration Options\n\n### Animation Timings\n\n```swift\nstruct AnimationTimings {\n    let initial: TimeInterval               // Delay before animation starts\n    let notchToRectangle: TimeInterval      // Time to expand from notch to rectangle\n    let rectangleToFullscreen: TimeInterval // Time to expand to fullscreen\n    let contentAppearance: TimeInterval     // Time for content to appear\n}\n```\n\n**Presets:**\n- `.default`: Balanced timing (0.27s, 0.8s, 0.6s, 0.5s)\n- `.slow`: Leisurely animations (0.4s, 1.2s, 0.8s, 0.7s)\n\n### Visual Customization\n\n```swift\nTransitionConfiguration(\n    backgroundColor: Color,        // Background color of the transition shape\n    backgroundMaterial: Material?  // Optional material effect for backdrop\n)\n```\n\n### Device Detection\n\nThe library automatically detects your device type and adapts accordingly:\n\n```swift\n// Get current device information\nlet deviceType = DeviceDetector.currentDevice\nlet topSafeArea = DeviceDetector.topSafeAreaInset\nlet notchSize = DeviceDetector.notchDimensions(for: deviceType)\n```\n\n## Animation Phases\n\nThe transition consists of four distinct phases:\n\n1. **Hidden** → **Notch**: Shape appears from the Dynamic Island/Notch area\n2. **Notch** → **Rectangle**: Expands to a rounded rectangle\n3. **Rectangle** → **Fullscreen**: Grows to fill the entire screen\n4. **Content Appearance**: Your content fades in with animation\n\n## Requirements\n\n- iOS 16.4+\n- Xcode 15.0+\n- Swift 5.9+\n\n## Examples\n\nThe library includes comprehensive example showing:\n\n- Basic implementation\n- Different animation speeds\n- Custom themes and materials\n- Device-specific adaptations\n- Advanced configurations\n\nRun the example project to see all features in action.\nSources/NotchTransition/Example/NotchTransitionExample.swift with Preview Canvas opened\n\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change!\n\n### Development Setup\n\n1. Clone the repository\n2. Open `Package.swift` in Xcode\n3. Make your changes\n4. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nIf you encounter any issues or have questions:\n\n1. Check the [Issues](https://github.com/kovs705/NotchTransition/issues) page\n2. Create a new issue with detailed information\n3. Include device model, iOS version, and code samples\n\n---\nInspired by iOS Dynamic Island transition on X\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkovs705%2Fnotchtransition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkovs705%2Fnotchtransition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkovs705%2Fnotchtransition/lists"}