Storyboard segues with closures
- iOS 8.0+
- Xcode 8.2.1 +
- Swift 3.0+
PrettySegue is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PrettySegue"
If you create a segue in storyboard named "area", you can perfrom the segue like this:
import PrettySegue
class ViewController: UIViewController {
// basic
@IBAction func onBtnA(sender: AnyObject) {
performSegue(withIdentifier: "area", sender: self) { (areaVC: AreaViewController) in
areaVC.height = 10
areaVC.width = 10
}
}
}
PrettySegue is available under the MIT license. See the LICENSE file for more info.