Skip to content

Instantly share code, notes, and snippets.

@bobleesj
Last active December 17, 2016 13:01
Show Gist options
  • Save bobleesj/4901b886a3af2530f1f9a48fb316288c to your computer and use it in GitHub Desktop.
Save bobleesj/4901b886a3af2530f1f9a48fb316288c to your computer and use it in GitHub Desktop.
class SecondVC: UIViewController {
@IBOutlet weak var secondVCLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self,
selector: #selector(doThisWhenNotify),
name: NSNotification.Name(rawValue: myNotificationKey),
object: nil)
}
func doThisWhenNotify() { print("I've sent a spark!") }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment