What is a swift protocol?



What is a swift protocol?..

Answer / Anand Singh

A Swift Protocol is a blueprint for creating and using objects that conform to a set of requirements. It defines a common interface, behaviors, and rules for these objects without providing an implementation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

What are swift categories?

1 Answers  


Explain enum?

1 Answers  


The following code snippet results in a compile time error: struct IntStack { var items = [Int]() func add(x: Int) { items.append(x) // Compile time error here. } } Explain why a compile time error occurs. How can you fix it?

1 Answers  


How to make a method or variable generics in swift?

1 Answers  


What is data structure in swift?

1 Answers  


What is a static variable swift?

1 Answers  


Consider the following code: var array1 = [1, 2, 3, 4, 5] var array2 = array1 array2.append(6) var len = array1.count What’s the value of the len variable, and why?

1 Answers  


What collection types are available in swift?

1 Answers  


What is swift programming?

1 Answers  


What is the characteristics of switch in swift?

1 Answers  


Is swift similar to c?

1 Answers  


Is swift object oriented?

1 Answers  


Categories