开发者

Getting a UIButton to send commands to another View Controller

开发者 https://www.devze.com 2023-01-03 08:39 出处:网络
Question.. I\'m currently making a conversion app. I have for the first tab where the information is entered. Views 2 and 3 are where the information from view 1. I\'m having an issue.. I\'m not sure

Question.. I'm currently making a conversion app. I have for the first tab where the information is entered. Views 2 and 3 are where the information from view 1. I'm having an issue.. I'm not sure how to send the information from view 1 to view 2 and开发者_如何学编程 3.

I've looked at examples.. but I'm still not quite grasping the idea of it. any suggestions?

Thanks!


Instead of thinking in terms of sending information between views, create a "model object" that contains all the data that is shared between views, and let controller classes take care of updating the views when the model is changed.

Also, take a look at the documentation for NSNotificationCenter for a way to "broadcast" data updates throughout your app.

0

精彩评论

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