I'm building an iOS application. Most of the application requires access to a persistent object. This object is instantiated when the app loads via the Application Delegate.
The problem I have is that numerous View Controllers that need to access this object.
What is the best way and best practice to create global objects that can be access from anywhere in the application?
Examples would be appreciated. Many thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…