Tag: Optional Methods

  • 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…