what is singleton class? Why the whole application creates a single instance?
Answer / 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 |
What is @implementation?
What is the difference between NSArray and NSMutableArray in iOS operating system?
Explain me what is arc? How it works?
What is dependency management tools?
What is meaning of 'nonatomic' keyword?
What is the mean of not running state in ios?
Who is the founder of ios?
What is autorealease pool?
Explain interfaces?
What is thread in ios swift?
What is delegate in ios objective c?
Describe the functionality of accelerometer of an iphone ?