🍞 [Beta] A view controller that can unwind like presentation and navigation.

Overview

FluidPresentation - no more handling presented or pushed in view controller

A view controller that supports the interactive dismissal by edge pan gesture or screen pan gesture from modal presentation.

Using Presentation Using Presentation
CleanShot 2021-04-24 at 00 26 38 CleanShot 2021-04-24 at 00 26 14

Motivation - Using UINavigationController make the app complicated.

πŸ€·πŸ»β€β™‚οΈ View Controller would be displayed in push and modal.

Against the small application, a big application abolutely have a tons of transitions between view controllers.
In addition, the view controller migth be presented in navigation controller or modal presentation.
Which means that should support the both of presentations.

And also self.navigationController?.push is not safe operation. (under the dependencies the context.)

πŸ™…β€β™‚οΈ What about Coordinator pattern?

Coordinator-pattern's purpose is solving those problems from complex transitions. However, even this pattern, it's hard to manage pushing and presenting view controller corresponding to the context.

πŸ™‹β€β™‚οΈ So, FluidPresentation stop us to use push, instead only uses present.

FluidPresentation provides FluidViewController as a primitive component.
It does animation like push or presentation in modal presentation transitioning.

And we can create hierarchy by using presentation context in UIKit.
For example, fullScreen or currentContext.

Usage

Create a view controller by subclassing from FluidViewController.

final class YourViewController: FluidViewController {

}

Presentation style

let viewController: YourViewController
present(viewController, animated: true, completion: nil)

Navigation style

let viewController: YourViewController

viewController.setIdiom(.navigationPush())

present(viewController, animated: true, completion: nil)

Present your own view controller by wraping with FluidViewController.

Presentation style

let viewController: YourViewController

let fluidViewController = FluidViewController(idiom: .presentation, bodyViewController: viewController)

present(fluidViewController, animated: true, completion: nil)

Navigation style

let viewController: YourViewController

let fluidViewController = FluidViewController(idiom: .navigationPush(), bodyViewController: viewController)

present(fluidViewController, animated: true, completion: nil)

Using NavigationBar for view controller's navigationItem

NavigatedFluidViewController displays UINavigationBar as standalone using the view controller's navigationItem.

☝️ NavigationBar transitions as cross-dissolve if previous or next view controller is the type of NavigatedFluidViewController.
That makes the user can feel like using basic navigation system.

let viewController: YourViewController

let fluidViewController = NavigatedFluidViewController(idiom: .navigationPush(), bodyViewController: viewController)

present(fluidViewController, animated: true, completion: nil)

Technical information

https://developer.apple.com/videos/play/wwdc2013/218/ https://developer.apple.com/videos/play/tech-talks/10869/

License

FluidPresentation is released under the MIT license.

You might also like...
πŸ“±πŸ“² Navigate between view controllers with ease. πŸ’« πŸ”œ More stable version (written in Swift 5) coming soon.

CoreNavigation πŸ“± πŸ“² Navigate between view controllers with ease. πŸ’« πŸ”œ More stable version (written in Swift 5) coming soon. Getting Started API Refe

Interface-oriented router for discovering modules, and injecting dependencies with protocol in Objective-C and Swift.
Interface-oriented router for discovering modules, and injecting dependencies with protocol in Objective-C and Swift.

ZIKRouter An interface-oriented router for managing modules and injecting dependencies with protocol. The view router can perform all navigation types

Appz πŸ“± Launch external apps, and deeplink, with ease using Swift!
Appz πŸ“± Launch external apps, and deeplink, with ease using Swift!

Appz πŸ“± Deeplinking to external applications made easy Highlights Web Fallback Support: In case the app can't open the external application, it will f

🎯Linker  Lightweight way to handle internal and external deeplinks in Swift for iOS
🎯Linker Lightweight way to handle internal and external deeplinks in Swift for iOS

Linker Lightweight way to handle internal and external deeplinks in Swift for iOS. Installation Dependency Managers CocoaPods CocoaPods is a dependenc

Monarch Router is a Declarative URL- and state-based router written in Swift.
Monarch Router is a Declarative URL- and state-based router written in Swift.

Monarch Router is a declarative routing handler that is capable of managing complex View Controllers hierarchy transitions automatically, decoupling View Controllers from each other via Coordinator and Presenters. It fits right in with Redux style state flow and reactive frameworks.

An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind
An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind

Composable Navigator An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind Vanilla S

A framework for easily testing Push Notifications and Routing in XCUITests
A framework for easily testing Push Notifications and Routing in XCUITests

Mussel πŸ¦ͺ πŸ’ͺ A framework for easily testing Push Notifications, Universal Links and Routing in XCUITests. As of Xcode 11.4, users are able to test Pus

A bidirectional Vapor router with more type safety and less fuss.

vapor-routing A routing library for Vapor with a focus on type safety, composition, and URL generation. Motivation Getting started Documentation Licen

A bidirectional router with more type safety and less fuss.
A bidirectional router with more type safety and less fuss.

swift-url-routing A bidirectional URL router with more type safety and less fuss. This library is built with Parsing. Motivation Getting started Docum

Releases(0.1.0)
Owner
Muukii
Swift & iOS - Working on creating apps and open-sourced libraries. I'm interested in Creating smooth and fancy UI, State-Management, Image Processing.
Muukii
Provides a custom presentation modifier that provides more options including full screen presentations. (iOS)

Presentation Also available as a part of my SwiftUI+ Collection – just add it to Xcode 13+ Provides a custom presentation modifier that provides more

SwiftUI+ 15 Dec 3, 2022
iOS routing done right. Handles both URL recognition and controller displaying with parsed parameters. All in one line, controller stack preserved automatically!

Developed and Maintained by Ipodishima Founder & CTO at Wasappli Inc. (If you need to develop an app, get in touch with our team!) So what is this lib

null 589 Dec 24, 2022
Easy and maintainable app navigation with path based routing for SwiftUI.

Easy and maintainable app navigation with path based routing for SwiftUI.

Freek Zijlmans 278 Jun 7, 2021
RxFlow is a navigation framework for iOS applications based on a Reactive Flow Coordinator pattern

About Navigation concerns RxFlow aims to Installation The key principles How to use RxFlow Tools and dependencies GitHub Actions Frameworks Platform L

RxSwift Community 1.5k May 26, 2021
An experimental navigation router for SwiftUI

SwiftUIRouter ?? An ⚠️ experimental ⚠️ navigation router for SwiftUI Usage ?? Check out ExampleApp for more. Define your routes: import SwiftUIRouter

Orkhan Alikhanov 16 Aug 16, 2022
URLScheme router than supports auto creation of UIViewControllers for associated url parameters to allow creation of navigation stacks

IKRouter What does it do? Once you have made your UIViewControllers conform to Routable you can register them with the parameters that they represent

Ian Keen 94 Feb 28, 2022
πŸ›£ Simple Navigation for iOS

Router Reason - Get Started - Installation Why Because classic App Navigation introduces tight coupling between ViewControllers. Complex Apps navigati

Fresh 457 Jan 4, 2023
A custom modal transition that presents a controller with an expanding effect while sliding out the presenter remnants.

DAExpandAnimation A custom modal transition that presents a controller with an expanding effect while sliding out the presenter remnants. Screenshot I

Denis Avdeev 578 Nov 29, 2022
⛡️ URLNavigator provides an elegant way to navigate through view controllers by URLs.

URLNavigator ⛡️ URLNavigator provides an elegant way to navigate through view controllers by URLs. URL patterns can be mapped by using URLNavigator.re

Suyeol Jeon 2.6k May 27, 2021
A demonstration to the approach of leaving view transition management to a router.

SwiftUI-RouterDemo This is a simplified demonstration to the approach of leaving view transition management to a router.

Elvis Shi 3 May 26, 2021