views:

283

answers:

1

I am writing an Tab-Based iPhone application (3.1.2). The purpose of this application is to gather and process data from the GPS, accelerometer, etc. from one view, and then, once data collection has finished, pass this data to another view in order to graph the values. What is the best way to pass this data? Would it make sense to use SQLite or CoreData, or is there some other more expedient method? The graphing and data collection both work separately, but I am at a loss for how to pass the values between the two. I have read that this is frowned upon, but can I reference the instance of the graphing viewcontroller from the application's UITabBarController in order to pass the data?

Thanks,

James

+1  A: 

does your graphing viewcontroller show a graph of the most recent data? In that case you might not have to pass it anything. It can simply open te database and ask for the latest data. Your collecting view does the reverse, it opens the database and inserts data.

So no connection between the views. They both simply work on the database directly.

St3fan
I have not actually implemented the database yet, just given the grapher dummy values to test functionality. I will take this as an affirmation that I should pass values through a database. Thanks for the reply!
James