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
What are the different delete rules that a relationship can have? Which one takes ownership?
Is uikit thread safe?
What is bundle id?
Tell me what is fast enumeration?
Ellaborate viper architecture?
How to start a selector on a background thread.
What are the Common reasons for app rejection from app store review process?
Which is the default for synthesized properties?
How to set your application id after becoming a member of iphone developer program?
How to parse xml?
What are layer objects in iOS operating system?
Explain @synchronized ,@dynamic
What is category and extension in ios?
What does 2x resolution mean?
What is dynamic in iOS operating system?