Tag: Protocol

  • Protocol Oriented Programming in Swift

    Object Oriented Programming is a paradigm used by programmers many decades to solve computer problems by model them in to classes. In Swift 2.0 a new programming pattern has been introduced known as Protocol Oriented Programming. In this article, we will the three major feature as part of Protocol Oriented Programming Model with Protocols and…

  • Tuples, Enums and Protocols in Swift

    Tuples in Swift allows user to assign group of values to a variable, constant and even return parameter of a function. In the below example, a employee constant is assigned Int and String values. And to access these parameters, we need to use .0 and .1 [code language=”swift”]let employee = (103, “Deepak”) employee.0 employee.1[/code] Now…