{"id":17024590,"url":"https://github.com/dimillian/dmcustommodalviewcontroller","last_synced_at":"2025-03-17T10:33:49.753Z","repository":{"id":8296150,"uuid":"9837330","full_name":"Dimillian/DMCustomModalViewController","owner":"Dimillian","description":"A UIViewController which take a root view controller and present it modally with a nice animation","archived":false,"fork":false,"pushed_at":"2017-04-18T01:58:15.000Z","size":366,"stargazers_count":113,"open_issues_count":8,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-27T22:22:17.903Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/Dimillian.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":"2013-05-03T14:16:00.000Z","updated_at":"2024-06-12T08:48:23.000Z","dependencies_parsed_at":"2022-08-07T01:15:42.202Z","dependency_job_id":null,"html_url":"https://github.com/Dimillian/DMCustomModalViewController","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FDMCustomModalViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FDMCustomModalViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FDMCustomModalViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FDMCustomModalViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dimillian","download_url":"https://codeload.github.com/Dimillian/DMCustomModalViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858016,"owners_count":20359261,"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":"2024-10-14T07:26:10.969Z","updated_at":"2025-03-17T10:33:49.467Z","avatar_url":"https://github.com/Dimillian.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"DMCustomModalViewController\n===========================\nDMCustomModalViewController is a  `UIViewController` subclass which take a root view controller and present it modally with a nice animation (a la gmail).\n\nYou should not subclass it, it act as a container view controller that you can directly instantiate and use. \n\nFor iOS 7 and later\n\n##Features\n\n`DMCustomModalViewController` provide a quick and an easy solution to display modal view controller with a nice animation. It have an option to display the modal view controller not full screen and keeping the current view controller in the background with a nice overlay on it. \n\n1. 2 ways of presenting it, fullscreen or not full screen.\n2. Nice animations!\n3. Keep the current context and display the view in background and add an onverlay on it.\n4. More to come.\n\n\n##How to use it\n\n**TL;DR:** Look at the example provided. \n\n###Cocoapods\n\nAdd `pod DMCustomModalViewController` to your podfile\n\n###Run the example and install it manually\n\nRun `pod install`in the example folder\n\n1. Add DMCustomModalViewController.h and .m from the **classes/** folder to your Xcode project.\n2. Add QuartzCore.framework to \"Link Binary With Libraries\" (.xcodeproj -\u003e Build Phases)\n3. Import `DMCustomModalViewController.h`where you want to use it. \n\n###Full Screen\n\n\tModalRootViewController *root = [[ModalRootViewController alloc]initWithNibName:nil bundle:nil];\n    _fullScreenModal = [[DMCustomModalViewController alloc]initWithRootViewController:root\n                                                                                   parentViewController:self];\n    [self.fullScreenModal setDelegate:self];\n    [self.fullScreenModal presentRootViewControllerWithPresentationStyle:DMCUstomModalViewControllerPresentFullScreen controllercompletion:^{\n        \n    }];\n    \n###Part screen\n\n![image](https://raw.github.com/Dimillian/DMCustomModalViewController/master/screen1.png)\n\n\n    ModalRootViewController *root = [[ModalRootViewController alloc]initWithNibName:nil bundle:nil];\n    _partModal = [[DMCustomModalViewController alloc]initWithRootViewController:root\n                                                                                   parentViewController:self];\n    [self.partModal setDelegate:self];\n    self.partModal.rootViewControllerHeight = 350;\n    [self.partModal presentRootViewControllerWithPresentationStyle:DMCustomModalViewControllerPresentPartScreen controllercompletion:^{\n        \n    }];\n    \nIf you are not presenting it fullscreen you need to set the `rootViewControllerHeight` property. This value will be used to know how much of your `rootViewController` need to be displayed\n\n###Dismiss\n`DMCustomModalViewController` provide a built in category, just import the **.h** of `DMCustomModalViewController` in your `rootViewController` you passed to the instance of `DMCustomModalViewController`, you will have access to a new property `customModalViewController`. You can then freely dismiss the modal from itself. \n\n \t[self.customModalViewController dismissRootViewControllerWithcompletion:^{\n\n    }];\n   \n   \nA better implementation would be to build yourself some `delegate` for your `rootViewController`, so the controller which fired the modal would be also responsible for dismissing it.\n\t\n\n###Delegate\n\n`DMCustomViewController` currently provide one delegate method to inform you when it was dismissed.\n\n\t@protocol DMCustomViewControllerDelegate \u003cNSObject\u003e\n\t@optional\n\t- (void)customModalViewControllerDidDismiss:(DMCustomModalViewController *)modalViewController;\n\t@end\n\n###Customization\nYou can customize the animation speed by setting the property `CGFloat animationSpeed` before presenting the modal view controller\nThe default value is 0.30\n\nYou can also customize the scaling of the parent controller view when the modal view is presented. It will affect the recoil effect. For that modify the property `CGFloat parentViewScaling` the default value is 0.80.\n\nAlso by default when you tap on the parent view when the modal is not presented full screen it will close it, you can turn it off by setting `tapParentViewToClose` to `NO`.\n\nIf you `rootViewController` view have a navigation bar you'll be able to drag the navigation bar if `dragRootViewNavigationBar` is set to YES (by default it is set to YES). Work only when the modal view is not presented full screen.\n\nThere are some other properties for you to play with.\n\nThe example provide sliders on the UI to better understand the effect of each property.\nJust run it in the simulator :)\n\n## Licensing \nCopyright (C) 2013 by Thomas Ricouard. \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimillian%2Fdmcustommodalviewcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimillian%2Fdmcustommodalviewcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimillian%2Fdmcustommodalviewcontroller/lists"}