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 are ios apps written in?

0 Answers  


What are the benefits of swift over objective-c ?

0 Answers  


What are the ios devices?

0 Answers  


What is Automatic Reference Counting (ARC) in iOS operating system?

0 Answers   B-Ways TecnoSoft,


What is a memory leak?

0 Answers  






what is navigation controller?

1 Answers  


How do I get rid of app errors on iphone?

0 Answers  


What is Delegation in iOS?

0 Answers   UGC Corporation,


What is App Bundle in iOS operating system?

0 Answers   TryTechnicals Pvt Ltd,


What are ios functions?

0 Answers  


Can java run on ios?

0 Answers  


How can we achieve singleton pattern in iOS?

0 Answers   Winsol Solutions,


Categories