{"id":22544272,"url":"https://github.com/dominikbutz/dymodalnavigationcontroller","last_synced_at":"2025-03-28T08:21:18.883Z","repository":{"id":56908110,"uuid":"180118986","full_name":"DominikButz/DYModalNavigationController","owner":"DominikButz","description":"UINavigationController subclass with support for custom size and present and dismiss animations.","archived":false,"fork":false,"pushed_at":"2022-08-25T05:52:48.000Z","size":33724,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T17:37:08.577Z","etag":null,"topics":["animation","swift","uinavigationcontroller"],"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/DominikButz.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":"2019-04-08T09:47:58.000Z","updated_at":"2022-08-25T05:52:57.000Z","dependencies_parsed_at":"2022-08-21T03:50:18.174Z","dependency_job_id":null,"html_url":"https://github.com/DominikButz/DYModalNavigationController","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DominikButz%2FDYModalNavigationController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DominikButz%2FDYModalNavigationController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DominikButz%2FDYModalNavigationController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DominikButz%2FDYModalNavigationController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DominikButz","download_url":"https://codeload.github.com/DominikButz/DYModalNavigationController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991877,"owners_count":20706196,"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","swift","uinavigationcontroller"],"created_at":"2024-12-07T14:06:42.035Z","updated_at":"2025-03-28T08:21:18.860Z","avatar_url":"https://github.com/DominikButz.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DYModalNavigationController\n\n[![Version](https://img.shields.io/cocoapods/v/DYModalNavigationController.svg?style=flat)](https://cocoapods.org/pods/DYModalNavigationController)\n[![License](https://img.shields.io/cocoapods/l/DYBadge.svg?style=flat)](https://cocoapods.org/pods/DYModalNavigationController)\n[![Platform](https://img.shields.io/cocoapods/p/DYModalNavigationController.svg?style=flat)](https://cocoapods.org/pods/DYModalNavigationController)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n\n DYModalNavigationController is a simple UINavigationController subclass written in Swift 5.0. Use cases:\n * present a small size view controller with rounded edges over the current context modally (e.g. if the content is rather small and the standard modal presentation would show a lot of empty space). Set a fixed size so that the navigation controller's size is not adjusted when the screen orientation changes. \n *  present a modal view controller over the current context with top, bottom, left, right margins with a fade in transition. The presenting view controller behind it is still visible at the margins (unless margins set to 0). The size adjusts automatically when the screen orientation changes.\n *  works in a SwiftUI project even without using UIViewControllerRepresentable. Simply create an instance of the DYModalNavigationController and call present() on the instance (available from version 1.2.1)\n\n## Example project\n\nTo checkout the example project, simply clone the repo or download the zip file. \n\n## Features\n\n* Create a DYModalNavigationController with a fixed size in case your view controller instance should not change its size when changing the screen orientation.\n* Set a background blur or dim effect\n* Customise the corner radius of the DYModalNavigationController view.\n* Set a slide in/out animation (customisable animation movement directions) or a fade in/out animation\n* Customise the drop shadow\n* Customise the animation transition duration\n\n## Installation\n\n\nInstallation through Cocoapods or Carthage is recommended. \n\nCocoapods:\n\ntarget '[project name]' do\n \tpod 'DYModalNavigationController'\nend\n\nCarthage: Simply add the following line to your Cartfile.\n\ngithub \"DominikButz/DYModalNavigationController\" ~\u003e 1.0\n\nCheck out the version history below for the current version.\n\nAfterwards, run \"carthage update DYModalNavigationController --platform iOS\" in the root directory of your project. Follow the steps described in the carthage project on github (click on the carthage compatible shield above). \n\nMake sure to import DYModalNavigationController into your View Controller subclass:\n\n```Swift\nimport DYModalNavigationController\n```\n\n## Usage\n\nCheck out the following examples. \n\n### Code example: Fixed size DYModalNavigationController with background blur\n\n\n```Swift\n\n   let size = CGSize(width: 300, height: 200)\n   var settings = DYModalNavigationControllerSettings()\n\t   settings.slideInDirection = .right\n   settings.slideOutDirection = .right\n   settings.backgroundEffect = .blur\n   self.navController = DYModalNavigationController(rootViewController: \t\t\tcontentVC(), fixedSize: size, settings: settings)\n\n```\n\n![DYModalNavigationController example](https://raw.githubusercontent.com/DominikButz/DYModalNavigationController/master/gitResources/DYModalNavigationController1-small.gif \"DYModalNavigationController example 1\") \n\n### Code example: DYModalNavigationController with margins and fade effect \n\n \n```Swift\n\t\n   var settings = DYModalNavigationControllerSettings()\n\t\tsettings.animationType  = .fadeInOut\n\t\t// animationType .slideInOut is default setting!\n   self.navController = DYModalNavigationController(rootViewController: \t\t\tcontentVC(), fixedSize: nil, settings: settings)\n   // with fixedSize nil, the size will be set according to the top, bottom, \t\t\tleft, right margins in the settings. \n\n```\n\n![DYModalNavigationController example](https://raw.githubusercontent.com/DominikButz/DYModalNavigationController/master/gitResources/DYModalNavigationController2-small.gif \"DYModalNavigationController example 2\") \n\n### Code example: DYModalNavigationController with custom animations\n \n```Swift\n\n   var settings = DYModalNavigationControllerSettings()\n\t\tsettings.animationType = .custom\n   self.navController = DYModalNavigationController(rootViewController: \t\t\tcontentVC(), fixedSize: size, settings: settings, customPresentationAnimation: { (transitionContext) in\n   \n   self.foldOut(transitionContext: transitionContext, navController: self.navController)\n   \n       }, customDismissalAnimation: { (transitionContext) in\n           \n    self.foldIn(transitionContext: transitionContext, navController: self.navController)\n    \n       })\n\n```\n\n![DYModalNavigationController example](https://raw.githubusercontent.com/DominikButz/DYModalNavigationController/master/gitResources/DYModalNavigationController3.gif \"DYModalNavigationController example 3\") \n\n## Change log)\n\n#### [Version 1.2.3](https://github.com/DominikButz/DYModalNavigationController/releases/tag/1.2.3)\nbottom margin bug fix\n\n#### [Version 1.2.2](https://github.com/DominikButz/DYModalNavigationController/releases/tag/1.2.2)\nThe nav controller is not bound to the bottom anchor of the container view when presenting. the constraint only works if the nav controller has a fixed size and enters the screen from the top or bottom. This change prevents a gap on devices with large safe area at the bottom of the screen (like iPhone 11 etc.). \n\n#### [Version 1.2.1](https://github.com/DominikButz/DYModalNavigationController/releases/tag/1.2.1)\nAdded customMask as property in DYModalNavigationControllerSettings (allows rounding a subset of corners). Added extension for SwiftUI with present function. \n#### [Version 1.2](https://github.com/DominikButz/DYModalNavigationController/releases/tag/1.2)\nadded backgroundEffectView as accessible parameter in the customAnimation closures.\n\n#### [Version 1.1](https://github.com/DominikButz/DYModalNavigationController/releases/tag/1.1)\nadded customPresentationAnimation and customDismissalAnimation to the initializer. \n\n#### [Version 1.0](https://github.com/DominikButz/DYModalNavigationController/releases/tag/1.0)\ninitial version.\n\n\n## Author\n\ndominikbutz@gmail.com\n\n## License\n\nDYModalNavigationController is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikbutz%2Fdymodalnavigationcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominikbutz%2Fdymodalnavigationcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikbutz%2Fdymodalnavigationcontroller/lists"}