Earlier this week, I showed you how to create a custom control using a bitmask. But it’s time to take it one step further by adding RxSwift to the mix. In this tutorial, we make the custom control we built reactive using RxSwift.
This tutorial has been updated for Xcode 8 and Swift 3. Control flow is an essential aspect of any programming language. In this and the next lesson, we discuss loops and conditionals. We start with conditionals.
In yesterday’s lesson of 30 Days of Swift, we talked about collection types. At first glance, the collection types defined by the Swift standard library look similar to the ones you find in other programming languages. But if you dig a little deeper, you start to see the differences.
This tutorial has been updated for Xcode 8 and Swift 3. In the previous lessons, we explored some of the common types defined by the Swift standard library. Today, we continue that exploration by taking a close look at collection types. The Swift standard library defines three collection types:
This tutorial has been updated for Xcode 8 and Swift 3. Tuples Now that you know the basics of variables, constants, and types, it’s time to learn about another powerful concept of Swift, tuples. A tuple groups multiple values into a single compound value. The following example illustrates this concept.
This tutorial has been updated for Xcode 8 and Swift 3. In the previous lesson, I briefly talked about variables and constants. You learned that the var keyword declares a variable and the let keyword is used to declare a constant. Both variables and constants store values that can be referenced by a name.
This tutorial has been updated for Xcode 8 and Swift 3. Swift is an easy language to get started with. The syntax is easy to understand and reminiscent of other popular programming languages you may already be familiar with. In 30 Days of Swift, you learn the fundamentals of the Swift programming language.
Enumerations There is one building block I haven’t mentioned yet, enumerations, or enums for short. Like structs, enums are value types. At first glance, structs and enums look very much alike. Enums can have methods and initializers. And while they can have computed properties, they cannot define properties.
Swift 3 brought many new features and enhancements to the language. It also introduced several changes to access control by adding two new access levels, open and fileprivate. I already discussed the difference between private and fileprivate earlier this year. In this tutorial, I focus on the difference between public and open.
In today’s tutorial, I want to show you a little know feature of access control in Swift.