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 Automatic Reference Counting (ARC) in iOS operating system?
What is block in ios?
Explain xctest test case code.
What is use of nsoperation? How nsoperationque works?
What are the functions of managed object context?
What are the design patterns in ios?
Explain which all events will perform an ios application in background
What json framework supported by ios?
When an app is said to be in active state?
Does objective-c contain private methods?
How to registering your device with the program portal for iphone development?
Explain the different types of ios application states.
What is the difference between NSArray and NSMutableArray in iOS operating system?
What is nsmanagedobjectcontext? What are the different concurrency types?
Please explain what is difference strong and weak reference?