Skip to content
This repository has been archived by the owner on Aug 13, 2021. It is now read-only.

Commit

Permalink
When using a transition with presentation, use the .custom modal pres…
Browse files Browse the repository at this point in the history
…entation style.

Summary: Otherwise the presentation controller will not be used.

Reviewers: O2 Material Motion, O4 Material Apple platform reviewers, #material_motion, markwei

Reviewed By: O2 Material Motion, O4 Material Apple platform reviewers, #material_motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D3201
  • Loading branch information
Jeff Verkoeyen committed May 11, 2017
1 parent 5b6149d commit b0be085
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/transitions/TransitionController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ public final class TransitionController {
Must be a subclass of MDMTransition.
*/
public var transition: Transition? {
set { _transitioningDelegate.transition = newValue }
set {
_transitioningDelegate.transition = newValue

if let transition = newValue as? TransitionWithPresentation {
_transitioningDelegate.associatedViewController?.modalPresentationStyle = .custom
}
}
get { return _transitioningDelegate.transition }
}

Expand Down

0 comments on commit b0be085

Please sign in to comment.