Tag: SwiftUI

Scroll to Index in SwiftUI

The scroll view reader’s content view builder receives a ScrollViewProxyinstance; A proxy value that supports programmatic scrolling of the scrollable views within a view hierarchy. with the use of proxy’s to perform scrollTo(index)scrolling. ScrollViewProxyscans all scroll ...

SwiftData in SwiftUI (Part 1)

Model Container An object that manages an app’s schema and model storage configuration. Model Container is set in WindowGroup. We can pass multiple data models over there. @main struct SwiftData_ExampleApp: App { var body: some Scene { WindowGroup { ...

SwiftUI at Airbnb: A Case Study

In recent years, SwiftUI has been making waves in the world of iOS app development. It represents a significant shift in how developers approach building user interfaces for Apple’s platforms. One company that has embraced this technology and reaped the benefits is Airbnb. In this article, ...

Create a Scalable SwiftUI MVVM Project

SwiftUI is the booming new framework built by Apple, and it’s built on top of their open-source coding language Swift. While it still has some catching up to do with UIKit in terms of functionality, SwiftUI provides developers with declarative syntax for creating views. As a result, it can hav...

SwiftData by Example: iOS 17 & SwiftUI 5 ??? Part 13

We are leveraging power of predicate based filtering to drive the search experience in the app. It would make sense to offer sorting option as well. We have already seen Query driven sort for book genre. Offering sorting options in apps yields numerous benefits. It enhances the user experience by...

How to show Skeleton/Loader in SwiftUI with redacted

In SwiftUI, redacted is a modifier used to obscure or "redact" sensitive information when displaying data in a view. It is often used for privacy or security reasons, especially when you want to display placeholders for data while keeping the actual content hidden. This is partic...

Build a 3D Editor in SwiftUI and SceneKit

I was working on an article that relied on having a 3D editor of sorts to set up a simulation, and well — more than halfway through, it became evident that the simple editor I had built was not going to cut it. So I decided to document my journey rebuilding said the simple editor. Join me in t...

Swift Charts: How to Make Stacked Bar Charts in iOS and SwiftUI

If plain vertical and horizontal bar charts aren’t enough, and you want to add another dimension to your data visualizations, well, you’re in luck. Stacked bar charts allow you to cram in extra data without ruining the aesthetics or user experience, and today you&rsqu...

Implementing address autocomplete using SwiftUI and MapKit

Surprisingly for myself, I realized that I have never implemented address autocompletion using only Apple technologies. Before, I had experience only with Google Places SDK and even with the not-so-well-known European GeoDataHub. I found it curious — to know how we can limit our...