Using self, weak, and unowned in Combine
Series of Combine framework programming related blog posts.
Series of Combine framework programming related blog posts.
Alerts are one of the most crucial building blocks of iOS applications. We can use them to inform users about an error if something takes more time, like downloading a file or ensuring that everything is OK. Another use case with alerts is asking confirmation if our app users want to delete something or make a wire transfer.
Are you relying on the default URLSession configuration for your network requests? You might want to check what the defaults are and decide if they are right for your app.
SwiftUI has a lot of modern and useful features. One of my favourite is @Environment property wrapper. It allows you to ge
One of the things I was most surprised with when starting my iOS career was the lack of a backed-in, system-wide keyboard avoidance: every app needs to show a keyboard at some point, and every app has to either re-invent the wheel or pick one of the de-facto standard open source solutions out there.
More than half of the apps I built during my career had networking code. Usually, we build apps for web services. Today we will talk about building the type-safe networking layer using Swift language features like enums, phantom types, and extensions.
As our codebase scales, the need for cleaner architecture becomes more apparent. The dependency inversion principle (DIP) is one tool that helps us build cleaner relationships among our software modules. In this post, DIP is presented using atomic modules and is later applied to frameworks.
The Dynamic Type feature allows users to choose the size of textual content displayed on the screen. It helps users who need larger text for better readability. It also accommodates those who can read smaller text, allowing more information to appear on the screen. Apps that support Dynamic Type also provide a more consistent reading experience. From Apple’s Developer Documentation.
How elements containing missing or invalid data can be automatically ignored when using Swift’s Codable API to parse JSON.
Giving users previews of links has gotten a lot easier in iOS 14: There’s a new Link Presentation framework that lets you show the same link presentation available to users in the Messages app. Use this framework to get link metadata, or present a nicer preview of links in your apps.
With Xcode 12, Apple improved the XCFramework format, which unlocks great new capabilities.
Learn how to implement a custom popup, a popover, a sheet, and a snackbar message in SwiftUI with complete code examples.
Learn how to effectively reload the expandable section header of a list constructed using the diffable data source. Sample code included.
A quick guide to creating your own custom SwiftUI environment values for things like global app settings.
During the last year, I totally understood the power of a single source of truth and a state container that holds the whole app state in a single place. I’ve used this approach in a couple of my apps and continue to use it in new projects.
When building new SwiftUI components, it’s common to offer variants for different purposes/screens.
Understanding Proxy Pattern in Swift within 5 minutes.
If SwiftUI is great for many things, migrating completely an existing app codebase to it can be really tricky. In a series of blog posts, I’ll share how to migrate an iOS app written in Swift with UIKit to SwiftUI. Today, let’s start with the navigation and the UI components with storyboards.