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.
Learn Swift and iOS development through comprehensive video guides
Showing 205 to 216 of 420 posts
9:09
The previous episode focused on the basics of compositional layouts. A key feature of compositional layouts is the simple and readable API. The code we wrote in the previous episode isn't complex or difficult to understand. Another nice bonus is that we didn't need to subclass the UICollectionViewCompositionalLayout class.
in Programming
16:22
Building modern user interfaces can be challenging if you solely rely on traditional Cocoa APIs. Apple is aware of this limitation and introduced a number of brand new APIs to build modern, performant user interfaces.
in Programming
11:35
In this episode, we use the MockClient class to unit test the FeedViewModel class. The unit tests for the FeedViewModel class will change as the project evolves. The primary goal of this episode is to show how the MockClient class helps us write unit tests for the FeedViewModel class.
in Programming
7:09
In the previous episode, we added the ability to define how the MockClient class responds. This added flexibility makes the MockClient class much more useful. In the next episode, I show you how we can use the MockClient class to unit test the FeedViewModel class.
in Programming
6:01
The MockClient class fetches its mock data from the application bundle. This works fine, but there are a few limitations. The most important limitation is the lack of flexibility. With the current setup, we can only test the happy path, that is, the application showing the user a list of episodes.
in Programming
9:12
Using a local server is a convenient solution during development because it makes it straightforward to set up a development environment. It also allows for flexibility, making it easy to tweak the implementation of the backend as you develop the client.
in Programming
6:45
To be productive and efficient, you need to know your tools. For a Swift or Cocoa developer, that means mastering Xcode. While Xcode is a complex piece of software with a fairly steep learning curve, the tricks listed in this episode should significantly boost your productivity.
6:47
The basics of Swift are easy to learn, but the language has evolved significantly over the past few years. The more I use the language, the more I learn about it and discover its lesser known features. In this episode, I would like to share a handful of tips and patterns I have picked up over the years. They are easy to implement and have the potential to transform messy code into elegant, readable code.
7:40
I make ample use of self-executing closures in a range of scenarios. In this episode, I show you several patterns in which self-executing closures come in useful and can improve the code you write.
15:27
The collection view of the feed view controller now displays episode images. We are almost ready to build the user interface of the collection view and style the EpisodeCollectionViewCell class. Before we start with that task, I want to create a framework for styling the application. That is the focus of this episode.
in Programming
14:41
The Cocoacasts API returns a remote image for each episode. The problem we face is that the images are in the SVG format. SVG images are ideal for web, but the UIKit framework doesn't know how to handle the SVG format. The solution we implement in this episode uses Cloudinary, a service that manipulates and transforms media, including images. We also add Kingfisher to the mix. Kingfisher is a popular image library to download and cache remote images.
in Programming
6:34
Before we continue populating the user interface of the feed view controller, we need to resolve an issue we introduced in the previous episode. The feed view controller asks its view model for an Episode object every time it needs to configure an episode collection view cell. The project adopts the Model-View-ViewModel pattern, which means that the view controller should not have direct access to model objects. In this episode, I show you a simple solution to hide the Episode object from the feed view controller.
in Programming