What is singleton class in ios?



What is singleton class in ios?..

Answer / Arvind Kumar Gautam

"In Apple iOS, a Singleton is a design pattern that ensures a class has only one instance and provides a global access point to it. It is useful for creating objects that need to be accessed across an application or when you want to centralize some functionality. You can create a singleton in Objective-C by defining a private sharedInstance method, making the constructor private, and providing a public static method to access the shared instance."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

Explain parent-child context setup?

1 Answers  


How to shut off message alerts in ios?

1 Answers  


What is ipa?

1 Answers  


Why do we need to use @Synthesize in iOS operating system?

1 Answers   TryTechnicals Pvt Ltd,


Which app specific objects store the app's content in iOS operating system?

1 Answers   TryTechnicals Pvt Ltd,


Is there any garbage collector concept available in iOS?

1 Answers   Winsol Solutions,


Explain the significance of autorelease?

1 Answers  


How do I get rid of app errors on iphone?

1 Answers  


What are the tools required to develop iOS applications? 

1 Answers   B-Ways TecnoSoft,


What is core data?

1 Answers  


What is difference between shallow copy and deep copy in ios ? : IOS Architect

1 Answers  


What is UICollectionView ?

1 Answers  


Categories