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

Explain me what is "delegate"?

1 Answers  


What is dispatch queue in ios?

1 Answers  


What is the difference between strong and retain.

1 Answers  


What are the different store migration options? How do they work?

0 Answers  


How to shut off message alerts in ios?

1 Answers  


What are the app states in ios?

1 Answers  


What does ios stand for in texting?

1 Answers  


What is the use of the UI Automation API?

1 Answers  


What is plist?

1 Answers  


Who calls the dealloc strategy?

1 Answers  


What are different ways that you can specify the layout of elements in a uiview?

1 Answers  


What is latest version of ios?

0 Answers  


Categories