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
Why do we need to use @Synthesize in iOS operating system?
Explain how to delete images in ios?
Can viewdidload be called multiple times?
Can my application have multiple models?
What are sensors in iphone?
What three types of navigation styles are used in ios?
What is category and class extension?
How many types of background modes supported in ios?
What are the benefits of swift over objective-c ?
How to do upload of large sized video file to server ? while uploading user presses “Homebutton” How long will execute?
Enlist the methods to achieve concurrency in ios?
what does @synthesize do?
What is synchronous vs. Asynchronous in gcd ?
How to switch off predictive text?
Which programming languages are used for ios development?