what is singleton class? Why the whole application creates a single instance?



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

Post New Answer

More Apple iOS Interview Questions

What is @implementation?

0 Answers  


What is the difference between NSArray and NSMutableArray in iOS operating system?

0 Answers   CDC,


Explain me what is arc? How it works?

0 Answers  


What is dependency management tools?

0 Answers  


What is meaning of 'nonatomic' keyword?

0 Answers  


What is the mean of not running state in ios?

0 Answers  


Who is the founder of ios?

0 Answers  


What is autorealease pool?

0 Answers  


Explain interfaces?

0 Answers  


What is thread in ios swift?

0 Answers  


What is delegate in ios objective c?

0 Answers  


Describe the functionality of accelerometer of an iphone ?

0 Answers  


Categories