Skip to content

Instantly share code, notes, and snippets.

@mayooresan
Created July 18, 2017 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayooresan/b3b3e3e8c10631f670add8dd0bef93e1 to your computer and use it in GitHub Desktop.
Save mayooresan/b3b3e3e8c10631f670add8dd0bef93e1 to your computer and use it in GitHub Desktop.
import UIKit
class HomeBaseVC: UIViewController, SpyDelegate {
override func viewDidLoad() {
super.viewDidLoad()
}
func didFindWeaponOfMassDestruction(found: Bool) {
// Handle the received data here
if found{
print("Launch cruise missiles and invade")
}else{
print("Abort the mission to invade")
}
}
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
if segue.identifier == "sendSpySegue" {
let vc : EnemyBaseVC = segue.destination as! EnemyBaseVC
vc.delegate = self
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment