If I need to perform a method whose multiple parameters' original source are optional, is doing multiple optional binding before performing the method the cleanest way to go about this?
e.g. UIStoryboardSegue's sourceViewController and destionationViewController are both AnyObject? and I need to use source's navigationController to perform something.
override func perform() {
var svc = self.sourceViewController as? UIViewController
var dvc = self.destinationViewController as? UIViewController
if let svc = svc, dvc = dvc {
svc.navigationController?.pushViewController(dvc, animated: true)
}
}