{"id":16684961,"url":"https://github.com/tungvoduc/dtcontainercontroller","last_synced_at":"2025-04-09T23:52:42.728Z","repository":{"id":56907936,"uuid":"104518593","full_name":"tungvoduc/DTContainerController","owner":"tungvoduc","description":"A Swift container view controller to handle transitioning to a different child view controller.","archived":false,"fork":false,"pushed_at":"2019-04-30T21:45:01.000Z","size":251,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T23:52:37.492Z","etag":null,"topics":["cocoapods","container-viewcontroller","swift","swift4","swift5","viewcontroller","xcode"],"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/tungvoduc.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":"2017-09-22T21:04:08.000Z","updated_at":"2023-01-22T19:19:15.000Z","dependencies_parsed_at":"2022-08-21T03:21:01.899Z","dependency_job_id":null,"html_url":"https://github.com/tungvoduc/DTContainerController","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/tungvoduc%2FDTContainerController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungvoduc%2FDTContainerController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungvoduc%2FDTContainerController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tungvoduc%2FDTContainerController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tungvoduc","download_url":"https://codeload.github.com/tungvoduc/DTContainerController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131454,"owners_count":21052819,"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":["cocoapods","container-viewcontroller","swift","swift4","swift5","viewcontroller","xcode"],"created_at":"2024-10-12T14:45:38.467Z","updated_at":"2025-04-09T23:52:42.704Z","avatar_url":"https://github.com/tungvoduc.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DTContainerController\n\n[![CI Status](http://img.shields.io/travis/tungvoduc/DTContainerController.svg?style=flat)](https://travis-ci.org/tungvoduc/DTContainerController)\n[![Version](https://img.shields.io/cocoapods/v/DTContainerController.svg?style=flat)](http://cocoapods.org/pods/DTContainerController)\n[![License](https://img.shields.io/cocoapods/l/DTContainerController.svg?style=flat)](http://cocoapods.org/pods/DTContainerController)\n[![Platform](https://img.shields.io/cocoapods/p/DTContainerController.svg?style=flat)](http://cocoapods.org/pods/DTContainerController)\n\nDTContainerController is a view controller container written in Swift.\n\n## Why DTContainerController?\n\nThere are cases where you want to present a new view controller and destroy the current view controller. The most applicable cases are when user goes through onboarding phase and logs into the app or when user logs out from the app to log-in view. In these cases, the new view controller are presented and there is no reasons to keep old view controller alive,  this cannot be done by using present(_:animated:completion:) since the presenting view controller still exists after presentation. This is why DTContainerController becomes handy.\n\nDTContainerController should usually be used as the root view controller of the application window.\n\n## Screenshot\n![Screenshot](giphy.gif)\n\n## Usage\n\nDTContainerController has at most one child view controller. In order to set the child view controller or replace the current child view controller with animation, you can use:\n\n```swift\n// Set or replace current view controller without animation\ncontainerController.show(childViewController, animated: false, completion: nil)\n\n// Present a new child view controller and destroy current child view controller with transition\ncontainerController.show(childViewController, animated: true, completion: nil)\n```\n\nAccessing container controller ancestor is similar to navigationController or tabbarController:\n\n```swift\n// Access parent container controller and present a new view controller\nself.containerViewController?.show(childViewController, animated: true, completion: nil)\n```\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n#### iOS 8.3+\n\n## Installation\n\nDTContainerController is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'DTContainerController'\n```\n\n## Author\n\nTung Vo, tung98.dn@gmail.com\n\n## License\n\nDTContainerController is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftungvoduc%2Fdtcontainercontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftungvoduc%2Fdtcontainercontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftungvoduc%2Fdtcontainercontroller/lists"}