Filip Němeček 11/26/2024

Getting view size in SwiftUI without GeometryReader

Read Original

This article discusses a method for obtaining a view's size in SwiftUI without using GeometryReader. It introduces the onGeometryChange modifier, available from iOS 16+, as a solution for creating dynamically sized components like horizontal carousels or bottom sheets, and includes a practical code example.

Getting view size in SwiftUI without GeometryReader

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser