I am new to Objective-C with a background mainly in database programming. I am developing a medical application for the iPhone, which includes several formulas for calculations using many variables. In fact, each formula will have its own screen, but the numerical entries and calculations from each screen should appear on the screens for other formulas that have common entries, as the user moves between the screens, and the values ββof the variables changed on one screen must be updated. if they appear on another screen.
I understand the potential traps of global variables, but it seems like I need a set of global variables. I am wondering what is the best method to achieve this. I reviewed the use of singletones on this site and in the Apple documentation, and perhaps this method is a solution. I was also interested, perhaps, if you delve into Core Data, this is the right way, preserving the numerical variables entered or calculated on one screen, which will be obtained when a new formula appears on another screen.
Thanks in advance for any advice.
source share