From 5a6570a1e4fe8eef29d3fcffd4d1219fdff47590 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Tue, 16 May 2017 12:31:27 -0400 Subject: [PATCH] Allow TransitionWithPresentation to return nil for conditional presentation. Summary: Returning nil means no presentation controller will be used. Reviewers: O2 Material Motion, O4 Material Apple platform reviewers, #material_motion, randcode-generator Reviewed By: randcode-generator Tags: #material_motion Differential Revision: http://codereview.cc/D3229 --- src/transitions/Transition.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/transitions/Transition.swift b/src/transitions/Transition.swift index 9bcf89d..332c650 100644 --- a/src/transitions/Transition.swift +++ b/src/transitions/Transition.swift @@ -70,10 +70,12 @@ public protocol TransitionWithPresentation: Transition { The returned presentation controller may choose to conform to WillBeginTransition in order to associate reactive motion with the transition. + + If nil is returned then no presentation controller will be used. */ func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, - source: UIViewController) -> UIPresentationController + source: UIViewController) -> UIPresentationController? } /**