Created
July 25, 2018 02:04
-
-
Save jeksys/109d211ab7d585abb52ed243aeb63676 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
class WireFrame { | |
let navigationController: UINavigationController! | |
func showViewController1(data: Any?) { | |
let vc = ... //instantiate your view controller | |
vc.data = data | |
navigationController.pushViewController(vc, animated: true) | |
} | |
func showViewController2(data: Any?) { | |
let vc = ... //instantiate your view controller | |
vc.data = data | |
navigationController.pushViewController(vc, animated: true) | |
} | |
func showViewController3(data: Any?) { | |
let vc = ... //instantiate your view controller | |
vc.data = data | |
navigationController.pushViewController(vc, animated: true) | |
} | |
func showViewController4(data: Any?) { | |
let vc = ... //instantiate your view controller | |
vc.data = data | |
navigationController.pushViewController(vc, animated: true) | |
} | |
} | |
class MyViewController : UIViewController { | |
var wireFrame: WireFrame! | |
@objc | |
func showViewController1Action(_ sender: Any){ | |
wireframe.showVireController1(data: "Some data") | |
} | |
@objc | |
func showViewController2Action(_ sender: Any){ | |
wireframe.showVireController2(data: "Some data") | |
} | |
@objc | |
func showViewController3Action(_ sender: Any){ | |
wireframe.showVireController3(data: "Some data") | |
} | |
@objc | |
func showViewController4Action(_ sender: Any){ | |
wireframe.showVireController4(data: "Some data") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment