
An iOS sheet defaults to covering around half the screen, and while you can specify custom detents, it’s not enough. This article shows you how to easily make a sheet size to fit its content.
TL;DR
The approach in this code can be found in PresentationKit, which is an open-source library I created to handle alerts, modals, sheets, and toasts. Check out the project for more handy examples.
SwiftUI apps often need to perform async operations that will throw errors when things go wrong. This post shows how you can present alerts for such errors, without a bunch of messy code.
Daniel Saidi is an independent software engineer in Stockholm, Sweden. He focuses on mobile applications and system architecture and has been mobile tech and architecture lead at companies like Tradera and BookBeat. Daniel builds apps and SDKs for the Apple stack using Swift and SwiftUI. He is passionate about code and product development and loves to build things that make people happy.
Join the Mobile Signal Talent Directory and make your profile visible to hiring teams searching for iOS talent.