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
Differentiate ‘app id’ from ‘bundle id.’ Explain why they are used?
Define encoding or serialization??
What are ui elements and some common ways you can add them to your app?
When would you say that an app is not in a running state?
What is uikit in ios?
What widgets can not do ?
how push notification works?
Procedure to push the app in appstore?
What is iphone?
Can you explain ios design patterns?
What are the viewcontroller lifecycle in ios?
What is nspersistentstorecoordinator?
What is code signing in iOS operating system?
Difference b/w collectionView & uitableview?
Can we save posts to local drafts and figure out how to publish to the blog. What do we need to do?