iOS Training from beginner to advanced
If you’ve been working with View controllers for a while, you’ve probably dealt with prepareForSegue. In Xcode 11, there’s a new way to handle this that makes a little more sense: Segue actions. Let’s take a look at this feature. If you download the… Continue Reading “Segue Actions”
Of the most underrated collection types is sets. Sets are an unordered collection with unique values. Let’s take a look at what you can do with sets. Download the exercise files and you’ll find I created playground with a Struct called Pizza. I’ve made… Continue Reading “Use Sets in Swift”
One dilemma you’ll find when working with colors is switching between color systems. There’s two you’ll most often be using: the Red-Green-Blue or RGB and Hue-Saturation-Brightness or HSB. Download the Exercise file and run. It will give you the HSB value, but what if… Continue Reading “Change UIColors to RGB and HSB colors”
For reading ease and visual accessibility you should be using dynamic fonts whenever possible. Let’s look at an example you can get from the download files. I’ve run the Split View Controller from a previous tip in landscape on an iPad Pro 9.7 inch.… Continue Reading “Use Dynamic Type”
One of those difficult things for even experienced developers to understand is Automatic Reference Counting, or ARC. It is how Swift manages and conserves memory automatically. Take a look at the Exercise file. I have a playground in this project with two classes. One… Continue Reading “Understand ARC”
You’ll find closures throughout the API’s, but you may not know how to use them properly. Let’s take a basic tour of closures. Download the exercise file, and you’ll find a project with a playground. In the playground you’ll find a function to compute… Continue Reading “Understand Closures”
There’s many ways to handle errors in Swift. For some errors, using throws is a great way to handle errors without crashing the system. Download the exercise file. You’ll find a project with an embedded playground. While there’s a lot better ways to do… Continue Reading “Thrown Errors”
In many popular programming languages strings are little more than an array of characters, often referred to as C strings since C was one of the first languages to take this approach to strings. As we learned in the last post, with Swift’s use… Continue Reading “Swift Strings Are Not C Strings or NSStrings”
Special characters like emoji, accents, and symbols in your strings are easier to get than you think. This week, we’ll talk about how using Unicode characters in Swift Strings. Open the exercise file and you’ll find a project which we’ll use for this. I… Continue Reading “Unicode Characters in Strings”