If you’ve worked with blocks in C or Objective-C or lambdas in Ruby, then you won’t have a hard time wrapping your head around the concept of closures. Closures are nothing more than blocks of functionality that you can pass around in your code.

Continue Reading

Views: (10)
(0)

To get anything done in Swift, you need to learn the ins and outs of functions. Functions are exceptionally powerful and flexible in Swift. The basics are simple, especially if you’ve worked with other programming languages before. But because of Swift’s flexible syntax, functions can become confusing if you’re not familiar with the basics.

Continue Reading

Views: (14)
(0)

In the previous article, you learned about variables, constants, and some of the common data types, such as integers, floats, and strings. In this article, we zoom in on collections. Swift’s standard library defines three collection types: sets, arrays, and dictionaries. Let’s start with arrays.

Continue Reading

Views: (20)
(0)