i want to access a integer and a string from a class to all the other classes?
what is the best way to do it?
i want to increase the values any where in the program and then want to update them in the class declared….
any idea how to achieve this???
Here’s a question (and good answers) about singletons.
You could also use the app delegate, as frankodwyer suggested, and access it from anywhere using:
For ease of use and type safety I use a category like this:
Now you can access your app delegate from everywhere:
[UIApplication sharedDelegate]