This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func makeTestViewControllerTransitionCoordinator() -> UIViewControllerTransitionCoordinator { | |
class ViewControllerTransitionCoordinator: NSObject, UIViewControllerTransitionCoordinatorContext, UIViewControllerTransitionCoordinator { | |
public var isAnimated: Bool { return false } | |
public var presentationStyle: UIModalPresentationStyle { return .formSheet } | |
public var initiallyInteractive: Bool { return false } | |
@available(iOS 10.0, *) | |
public var isInterruptible: Bool { return false } | |
public var isInteractive: Bool { return false } | |
public var isCancelled: Bool { return false } | |
public var transitionDuration: TimeInterval { return 1 } | |
public var percentComplete: CGFloat { return 0 } | |
public var completionVelocity: CGFloat { return 1 } | |
public var completionCurve: UIViewAnimationCurve { return .easeIn } | |
@available(iOS 2.0, *) | |
public func viewController(forKey key: UITransitionContextViewControllerKey) -> UIViewController? { | |
return nil | |
} | |
@available(iOS 8.0, *) | |
public func view(forKey key: UITransitionContextViewKey) -> UIView? { | |
return nil | |
} | |
@available(iOS 2.0, *) | |
public var containerView: UIView { return UIView() } | |
@available(iOS 8.0, *) | |
public var targetTransform: CGAffineTransform { return .identity } | |
@available(iOS 10.0, *) | |
public func notifyWhenInteractionChanges(_ handler: @escaping (UIViewControllerTransitionCoordinatorContext) -> Void) { | |
} | |
@available(iOS, introduced: 7.0, deprecated: 10.0, message: "Use notifyWhenInteractionChangesUsingBlock") | |
public func notifyWhenInteractionEnds(_ handler: @escaping (UIViewControllerTransitionCoordinatorContext) -> Void) { | |
} | |
func animate(alongsideTransition animation: ((UIViewControllerTransitionCoordinatorContext) -> Void)?, completion: ((UIViewControllerTransitionCoordinatorContext) -> Void)?) -> Bool { | |
return true | |
} | |
func animateAlongsideTransition( | |
in view: UIView?, | |
animation: ((UIViewControllerTransitionCoordinatorContext) -> Void)?, | |
completion: ((UIViewControllerTransitionCoordinatorContext) -> Void)? | |
) -> Bool { | |
return true | |
} | |
} | |
return ViewControllerTransitionCoordinator() | |
} |
Author
ollieatkinson
commented
May 2, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment