The best way to keep global variables in iPhone app
问题 I'm new to iPhone development so want to ask, what is the best way to keep global variables and constants which can be accessed by many classes? Shall I keep them in app delegate or there is a better way which I don't know? Thanks 回答1: Keeping them in the app delegate is one solution, though it's not particularly elegant to shove everything into a class whose purpose is really to respond to events related to the application. For constants, you can simply create header files and use #define or