What is singleton class swift 3?



What is singleton class swift 3?..

Answer / Vijay Kumar

A Singleton is a design pattern that restricts the instantiation of a class to a single instance. In Swift, you can create a Singleton by using a private constructor and a static shared instance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

What is a lazy var in swift?

1 Answers  


Explain functions?

1 Answers  


Explain what Lazy stored properties is and when it is useful?

1 Answers  


What is nsrange in swift?

1 Answers  


What is indexpath in swift?

1 Answers  


Why is swift important?

1 Answers  


Mention what is the difference between Swift and ‘Objective-C’ language?

1 Answers  


How will you define base class?

1 Answers  


Explain the usage of class and benefits of inheritance.

1 Answers  


What is the purpose of swift?

1 Answers  


What is swift? How is it different from objective-c?

1 Answers  


What is singleton class swift 3?

1 Answers  


Categories