Created
June 13, 2019 17:30
-
-
Save vialyx/c60ce7659b8dd4de38ba96bf5b1a417c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
struct Segue { | |
var identifier: String | |
} | |
extension UIViewController { | |
func perform(segue: Segue, sender: Any? = nil) { | |
performSegue(withIdentifier: segue.identifier, sender: sender) | |
} | |
} | |
extension UIStoryboardSegue { | |
func equal(_ segue: Segue) -> Bool { | |
return identifier == segue.identifier | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment