bobleesj / Blog_NSNotification_Send_Data_ViewControllers

Learn how to send data between viewcontrollers using NSNotification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learn How to Send Spark with NSNotification

alt text

What you will be learning

  • Send Data between view controller

Introduction

Now, let’s talk about how and why we use NSNotification to pass data and communicate/notify between classes and structs. By the way, NSNotification, unlike its name, has nothing to do with Push Notification — rookie mistake 101 (me).

Yes, there are many ways to pass data in Swift: Delegate, Key-Value Observing, Segue, and NSNotification, Target-Action, Callbacks. However, each one has its own pros and cons. They are like dining utensils. For example, I wouldn’t use chopsticks — although it’s pretty darn good — to eat soup.


Read More: https://medium.com/ios-geek-community/pass-data-with-nsnotification-in-swift-3-73743723c84b#.bearbf7uc

Facebook Page: https://facebook.com/bobthedeveloper

About

Learn how to send data between viewcontrollers using NSNotification


Languages

Language:Swift 100.0%