c-villain / SwipeActions

Swipe actions for any view, swipe menu based on SwiftUI, full swiping and RTL languages supporting, iOS 13+, add your own views to swipes
https://t.me/swiftui_dev
MIT License
234 stars 27 forks source link

Prevent background and menu content from expanding cell content height #27

Closed ekurutepe closed 2 months ago

ekurutepe commented 2 months ago

In the current implementation the use of ZStack causes the background color to expand to maximum available dimensions. This is ok if all swipeable rows are intended to be the same height but it breaks layout if you need to use rows which size themselves to their content.

By replacing ZStack with .background modifier this issue can be resolved. Please note that this necessitates increasing the minimum iOS version to 15 which is probably fine.

c-villain commented 2 months ago

@ekurutepe If you find a bug or want to suggest an improvements please open an issue with example of code...