开发者

iOS: sending messages across controllers

开发者 https://www.devze.com 2023-03-02 16:35 出处:网络
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.

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.

开发者_StackOverflow

How do I do this?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号