Los patrones de diseño en Swift. Lo primero que me vas a decir que esto no es sólo de iOS, sino que es aplicable a todos los lenguajes de programación. Pues sí, pero yo lo voy a orientar todo para Swift, y los ejemplos de cada patrón los veremos en Swift. Dichos esto, veamos los patrones de diseño …
Swift and Beach
Tuples in Swift
Tuples group multiple values into a single composite value. They can be created on the fly. Values within a tuple can be of any type. They do not have to be the same type as each other. Swift 4 introduces Tuples type. They are used many times to return multiple values from a function …
Swift String to Int
In this case we have an integer within a string. Well, it can be converted to an integer simply by using the integer initializer. Let's look at the example code: Strings can contain anything other than a number, anything, for example "Palm" instead of "328": the Int initializer then returns an …
Swift Int to String
Subscribe!!! Swift Int to String is very easy. There are several ways to perform the operation. Let's look at the first way, use a String constructor. Using a String Constructor In this case to pass from Int to String in Swift we are going to use a constructor. Sample code: This …