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 is meaning of 'atomic' keyword?
What are the steps you must follow to configure your computer and development device for iphone development?
Will iphone 6s get ios 14?
What are the application lifecycle in ios?
What is ios technology?
Explain me what is fast enumeration?
Flow of push notification?
what does @synthesize do?
Explain the difference between inheritance and category?
What is meaning of 'copy' keyword?
How to start a selector on a background thread.
What is iphone screen size?
What major changes released in ios7, ios8, ios9+?
Is xcode a framework?
Can I have relationship between entities in separate stores (in case of configurations)?