Skip to content

Instantly share code, notes, and snippets.

@jeksys
Created July 25, 2018 02:04
Show Gist options
  • Save jeksys/109d211ab7d585abb52ed243aeb63676 to your computer and use it in GitHub Desktop.
Save jeksys/109d211ab7d585abb52ed243aeb63676 to your computer and use it in GitHub Desktop.
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