Category Archives: SwiftUI

How to use confirmationDialog in swiftUI?

By | March 27, 2025

In SwiftUI, confirmationDialog() is a view modifier that presents a confirmation dialog, offering a way to prompt users for confirmation before performing actions, especially those that might be irreversible or important. It’s similar to an alert, but it slides up from the bottom and allows for multiple buttons with different roles.  I’ll create a comprehensive example of using ConfirmationDialog… Read More »

How do I implement pull to refresh in SwiftUI?

By | June 11, 2024

There are two main approaches to implementing pull-to-refresh functionality in SwiftUI, depending on your SwiftUI version and desired level of customization: 1. Using the built-in refreshable modifier (iOS 16+) If you’re targeting iOS 16 and above, SwiftUI offers a built-in refreshable modifier that simplifies pull-to-refresh functionality for List and ScrollView. Here’s how to use it:… Read More »

How to use ‘AsyncImage’ in swiftUI?

By | May 27, 2024

AsyncImage is a component introduced in SwiftUI to handle the loading and displaying of remote images asynchronously. It simplifies the process of fetching images from the web, handling the loading state, and displaying a placeholder until the image is ready. Here’s a detailed breakdown of how AsyncImage works, its customisation options, and usage examples. Basic… Read More »