Learn Swift and iOS Development
Master iOS development through in-depth tutorials and comprehensive courses on Swift, SwiftUI, UIKit, Core Data, and more.
Master iOS development through in-depth tutorials and comprehensive courses on Swift, SwiftUI, UIKit, Core Data, and more.
6:49
A build configuration defines the build settings that are used to build the product of a target. As the name suggests, build settings are used to build the product of a target. Even though you don't commonly access build settings in Swift, it can be useful to keep configuration and implementation separate. It is a pattern I have been using for several years. In this episode, I show you how to access build settings in Swift.
in Foundation
6:46
The interface of the UserDefaults class is easy to use, but it lacks type safety. If you want to store and retrieve an enum, for example, you need to jump through a few hoops. Let me show you an example from Cloudy, the application we build in Mastering MVVM With Swift.
in Foundation
4:15
Last week, I was browsing Apple's What's New in iOS documentation and noticed that several brand new types were added to the Foundation framework. The one that caught my interest was the NSDateInterval class. In this tutorial, I show you how to use the NSDateInterval class and why it is such an interesting addition to the Foundation framework.
in Foundation
5:09
At times, it can seem as if Foundation is an old, dusty framework that you need to use to get anything done on iOS, tvOS, macOS, or watchOS. Nothing could be further from the truth. Every year, Apple improves the framework and adds new components to better serve developers. In this tutorial, I like to talk about a favorite of mine, the NSURLComponents class or, in Swift, the URLComponents structure.
in Foundation
Swift underwent drastic changes with the release of version 3 of the language. As you probably know, those changes weren't limited to the language and the standard library. Apple made many, many changes to the Foundation framework, for example.
in Foundation
Most applications store small pieces of information in the defaults system. The UserDefaults class, defined in the Foundation framework, provides quick access to the defaults system through an easy to use interface. The following code snippet should look familiar.
in Foundation
Strings are an integral part of almost every programming language, and Swift is no different. At its core, a string is a sequence of characters that can represent text. From user interfaces to data processing, strings are everywhere in software development. Having a deep understanding of strings is therefore foundational.
in Foundation
If you need to create a single value from a sequence of elements, then the reduce(::) method is the API you are looking for. In this episode of Swift Fundamentals, we take a look at Swift's reduce(::) method. You learn about its syntax and when you shouldn't use it.
in Foundation
Formatting a time interval in Swift is trivial thanks to Foundation's DateComponentsFormatter class. While it can do more than formatting time intervals this episode shows you how to use the DateComponentsFormatter class to convert a TimeInterval object to a String object.
in Foundation