4.4. Navigation Controller and sending data from screen 1 to screen 2
Adding a struct
class ViewController: UIViewController {
//codes omitted...
//MARK: struct to create a package to send to the Display Screen...
public struct Package {
var message:String?
var mood:String?
init(message: String? = nil, mood: String? = nil) {
self.message = message
self.mood = mood
}
}
//codes omitted...
}
//codes omitted...Handling the Button Tap action
Sending Data
Receiving data at DisplayViewController

Last updated