PureSegue
PureSegue
PureSegue makes usage of storyboard segue very simple and allows you to get rid of prepareForSegue.
prs_performSegue(withIdentifier: "segue_identifier", configurate: { segue in
//segue: UIStoryboardSegue
})If you use destination class' name as identificator for segue, it will automatically use type casting in closure:
prs_performSegue(to: MyViewController.self, configurate: { viewController in
//viewController: Optional<MyViewController>
})Don't worry, usage of PureSegue doesn't influence on usage of prepareForSegue.
Install CocoaPods
To install it, simply add the following line to your Podfile:
pod 'PureSegue'Author
Artem Mylnikov (ajjnix), [email protected]
License
PureSegue is available under the MIT license. See the LICENSE file for more info.