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.
Discover the newest tutorials on Swift and iOS development
Discover the newest tutorials on Swift and iOS development
Showing 637 to 648 of 716 posts
Did you know that you can preview SwiftUI views on a physical device? This feature is built into Xcode. Connect a device to your development machine and open a SwiftUI view in Xcode. Xcode automatically brings up the canvas on the right, showing you a preview of the SwiftUI view you are working on.
in SwiftUI
Working with URLs can be tedious if you're unfamiliar with some of Foundation's hidden gems. In this episode, we take a look at one of those gems, the URLQueryItem struct. This nifty, little struct takes care of a range of seemingly trivial tasks. Let's take a look.
A SwiftUI view by default doesn't extend beyond the edges of the safe area. While that is convenient, there are times where this default behavior isn't what you want. In this episode, you learn how to override this default behavior.
in SwiftUI
In this episode, we take a closer look at SwiftUI's Label view. A label is convenient for displaying a piece of text in combination with an icon or image. The idea is simple, but you can customize the behavior of a label quite a bit. It's a simple but powerful view.
in SwiftUI
In this episode, you learn how to create a tabbed application using TabView and the tabItem modifier. The setup is much simpler than using UIKit's UITabBarController class. Decorating the tab bar items with an icon and a title couldn't be simpler. Let's fire up Xcode and create a project.
in SwiftUI
You're reading this because you're looking for an equivalent for UIKIt's viewDidLoad() method. Right? I have good news and I have bad news. The bad news is that SwiftUI doesn't define an equivalent for UIKit's viewDidLoad() method. The good news is that I may be able to clear a few things up for you about SwiftUI.
in SwiftUI
Have you ever wondered what version of Swift you are using in the project you're working on? The answer is less straightforward that you might think. This episode of Swift Fundamentals sheds some light on this seemingly simple question.
in Swift
The Combine framework defines a number of operators to combine two or more publishers into a single publisher. Each of these operators serves a specific purpose. In this episode, I show you how to use the zip operator to combine publishers.
in Combine
Scene-based applications come with a few challenges for developers, one of them being dependency injection. How do you inject a dependency, such as a view model, into the root view controller of the window? That is the question I answer in this episode.
in UIKit
What I love most about RxSwift is RxCocoa. RxCocoa defines a wide range of integrations with UIKit and AppKit. It is surprising that Apple's Combine framework lacks these integrations. The good news is that most of the integrations RxCocoa defines are easy to implement using Combine. In this episode, I show you how to observe the value of a UITextField instance using the Combine framework.
in Combine
Every Combine publisher defines two associated types, the Output type defines the type of elements the publisher can emit and the Failure type defines the type of errors the publisher can emit. The fact that a publisher is required to define an Output type and a Failure type is convenient, but it can sometimes be inconvenient. What do I mean by that? Take a look at the following example from Building a Modern Networking Layer in Swift.
in Combine
Can you guess what happens if you execute this code snippet in a playground? The playground crashes due to an index out of bounds exception. This is a problem I have run into more times than I care to admit.