Hi,
I'm working on my first app now and it's going quite well, but I'm wondering if i'm using the correct app design.
I'm building an app which makes use of a navigationController to display a couple viewcontrollers.
In the first viewController a CustomObject is created and in the consecutive viewControllers properties for this customObject are chosen and set.
I've created a Singleton class which handles all coredata actions. creating a new object. saving the created object etc. The Singleton has a property currentObject. All ViewControllers have access to this singleton.
So for example, in view 1 the user tabs a button "new car". The CoreDataSingleton creates the new car object which is accessible using currentObject.
A new view is pushed and default values for the new car are shown.
The user tabs "select color", a new ViewController is shown where the color can be selected. Using the singleton.currentobject the color is set, the view is popped and other properties can be set and so on. Finally the user tabs "Save" and [Singleton saveCurrentObject] is called.
This method works fine, but I've been reading a lot of post on the web where people say that Singletons are bad, the worst you can do etc. etc…..
What do you think about this application design? If Singletons are bad, how would you implement this kind of functionality?
Regards, Michiel