iOS: sending messages across controllers
-
28-10-2019 - |
Frage
I have a menucell on a menuviewcontroller and a button in a mapviewcontroller.
When I click on the button in mapviewcontroller, I want to set the menucell contents to null.
How do I do this?
Lösung
Read up on NSNotificationCenter
. When the button is clicked in MapViewController you'll want to post a notification to MenuViewController. And don't forget to add a notification observer to MenuViewController to listen to the notification.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow