what is singleton class? Why the whole application creates a single instance?
Answer Posted / babu
A singleton class is a special kind of class where only one instance of the class exists for the entire application. (In the case of an iPhone app, the one instance is shared across the entire app.) Some examples in UIKit are [UIApplication sharedApplication] (which returns the sole instance of the application itself), and [NSFileManager defaultManager] (which returns the file manager instance). Singletons can be an easy way to share data and common methods across your entire app.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to registering your device with the program portal for iphone development?
What is sandbox in iOS operating system?
What are the design patterns in ios?
Describe @objc inference?
In mapKit frame work, how to get current user location
If any app can run in the background, what about battery life?
What is the meaning of 'strong'keyword?
What is nsoperation and nsoperationqueue in ios?
What is plist?
What is the use of double question marks (“??”) ?
What is arc ? How it works?
What is managed object context and what are its functions?
What is core data?
What does use core data mean in xcode?
Is appdelegate a singleton?