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
Define ipa?
How are non-atomic and atomic properties different?
What is the mean of not running state in ios?
What are sensors in iphone?
Are ios developers in demand?
Explain the difference between viewdidload and viewdidappear?
What is an NSOperationQueue and how/would you use it in iOS operating system?
What is clean architecture ios?
What is retain in ios?
Different types of persistent stores? Which all types can we have on ios?
Do you know what is iphone sdk?
Can you please explain the difference between frame and bounds?
Explain ios multitasking?
Explain difference between mrc and arc?
Explain your process for tracing and fixing a memory leak iOs?