Skip to content

Instantly share code, notes, and snippets.

@huntermonk
Created June 20, 2017 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huntermonk/3b77303bf2164d9d49fd913e88817f3a to your computer and use it in GitHub Desktop.
Save huntermonk/3b77303bf2164d9d49fd913e88817f3a to your computer and use it in GitHub Desktop.
let presentedViewController: UIViewController? = UIViewController()
struct Route {
var animateTransition: Bool
}
let route = Route(animateTransition: true)
let animated = presentedViewController == nil && route.animateTransition == false ? false : true
let animated2 = (presentedViewController == nil && route.animateTransition == false) ? false : true
let animated3 = !(presentedViewController == nil && route.animateTransition == false)
let animated4 = presentedViewController != nil || route.animateTransition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment