开发者

Sharing integer values among tab bar controllers

In my iOS app I have a main window with a tab bar. Each tab has its own controller, so I have开发者_如何学C multiple .m files. How can I obtain int values from each of these .m files and display them in a different tab (separate .m file)?

Can int values be called globally?

I would like to display all of these different values on one page as an overview.


Don't use global variables for this. Either save the ints using NSUserDefaults, or send them using NSNotificationCenter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜