Hi, can someone provide a little guidance on the best way to handle iPhone UI and processing while parsing a SOAP message? Here is the context:
- I have an app that allows a user to select a car (from a list of cars) they are interested in viewing.
- When they pick a car, I push a carDetails viewcontroller that shows the car detail categories. When I initialize carDetails, I alloc/execute another class called getCarData that contains SOAP and XMLParser methods that retrieve and load all the car details from a web service.
- Currently, the getCarData class returns control back to carDetails before it has completed it's processing (I believe due to the asynchronous nature of the XMLParser)
- But I need data from getCarData to be loaded before I allow the user to select any drill-down category information in carDetails (i.e. Interior, Engine, etc.)
My questions are;
- What is the best way to handle the wait process until the data is loaded?
- I have seen some forum questions on firing off separate threads so I don't tie up the UI, but I actually do want the user to wait (if necessary) until the data is loaded. So should I create another thread? Should I just simply display a progress window that hides the main window until data is loaded?
- What is the best way to check and see if the data has finished loading and if not, display the activity/progress view? In other words, should I handle it in the carDetails, getCarData, or maybe the AppDelegate?
Sorry for the multiple questions and (probably) noob problems, but I can't seem to find many discussions or code examples that I can use.
Thanks in advance - Mike