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
.
精彩评论