All Projects → tungvoduc → DTContainerController

tungvoduc / DTContainerController

Licence: MIT license
A Swift container view controller to handle transitioning to a different child view controller.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to DTContainerController

Arcarmovement
This is navigation example on google map. Here Marker move as vehicles moves with turns as uber does in their app. Using old and new coordinates animating bearing value the markers are moving.
Stars: ✭ 137 (+585%)
Mutual labels:  viewcontroller
Panel
A Snapchat inspired ScrollView Controller Written in Swift
Stars: ✭ 22 (+10%)
Mutual labels:  container-viewcontroller
Swift-FFDB
a Object/Relational Mapping (ORM) support to iOS and MacOS .Since SwiftFFDB is build on top of FMDB.
Stars: ✭ 22 (+10%)
Mutual labels:  swift5
Lgsidemenucontroller
iOS view controller which manages left and right side views
Stars: ✭ 1,856 (+9180%)
Mutual labels:  viewcontroller
MMAdvertScrollView
一个简单、轻量级的swift版公告轮播框架
Stars: ✭ 42 (+110%)
Mutual labels:  swift5
YRipple
iOS Ripple Effect, Xcode10 and Swift5 available
Stars: ✭ 18 (-10%)
Mutual labels:  swift5
Aicustomviewcontrollertransition
Easy and tidy way for creating custom UIViewController transitions for iOS
Stars: ✭ 130 (+550%)
Mutual labels:  viewcontroller
Table
CLI tables in Swift
Stars: ✭ 53 (+165%)
Mutual labels:  swift5
UberCarAnimation
This app is for animating a car like uber from one position to another with preserving angle and smooth animation
Stars: ✭ 53 (+165%)
Mutual labels:  swift5
Keepwords
📱🔐 Need an iOS password managing app with no pods? We got you covered!
Stars: ✭ 17 (-15%)
Mutual labels:  swift5
Archit Ios
Intelygenz iOS Architecture
Stars: ✭ 203 (+915%)
Mutual labels:  viewcontroller
Photoslider
PhotoSlider is a simple photo slider and can delete slider with swiping.
Stars: ✭ 237 (+1085%)
Mutual labels:  viewcontroller
Teller-iOS
iOS library that manages your app's cached data with ease.
Stars: ✭ 12 (-40%)
Mutual labels:  swift5
Jsqmessagesviewcontroller
An elegant messages UI library for iOS
Stars: ✭ 11,240 (+56100%)
Mutual labels:  viewcontroller
TipJarViewController
Easy, drop-in tip jar for iOS apps.
Stars: ✭ 79 (+295%)
Mutual labels:  viewcontroller
Xlslideswitch
iOS 仿照今日头条滚动列表
Stars: ✭ 136 (+580%)
Mutual labels:  viewcontroller
IBLayoutConstraint
📏 Configure constraints for each device in Interface Builder with IBLayoutConstraint.
Stars: ✭ 24 (+20%)
Mutual labels:  swift5
skillbox
Выполненные и принятые домашние задания, а также другие материалы, которые могут помочь в обучении
Stars: ✭ 32 (+60%)
Mutual labels:  swift5
BadgeControl
Badge view with controller written in Swift 5.0
Stars: ✭ 53 (+165%)
Mutual labels:  swift5
CameraButton
No description or website provided.
Stars: ✭ 31 (+55%)
Mutual labels:  swift5

DTContainerController

CI Status Version License Platform

DTContainerController is a view controller container written in Swift.

Why DTContainerController?

There 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.

DTContainerController should usually be used as the root view controller of the application window.

Screenshot

Screenshot

Usage

DTContainerController 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:

// Set or replace current view controller without animation
containerController.show(childViewController, animated: false, completion: nil)

// Present a new child view controller and destroy current child view controller with transition
containerController.show(childViewController, animated: true, completion: nil)

Accessing container controller ancestor is similar to navigationController or tabbarController:

// Access parent container controller and present a new view controller
self.containerViewController?.show(childViewController, animated: true, completion: nil)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8.3+

Installation

DTContainerController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'DTContainerController'

Author

Tung Vo, [email protected]

License

DTContainerController is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].