Question: how to pass data from view controller swift?
Answer: By using an instance property (A → B)
By using segues (for Storyboards)
By using instance properties and functions (A ← B)
By using the delegation pattern.
By using a closure or completion handler.
By using NotificationCenter and the Observer pattern.