Closed luap2703 closed 3 years ago
Do not use ..fitContentSize(dimension: .vertical) and fixedSize(horizontal: false, vertical: true) in iOS14 just a temporary measure
so the problem is related to iOS 14? Will there be a fix anytime soon?
Thank you so much for the answer btw!!
For a waterfall layout it is important to know the aspect ratios ahead of time as a single cell changing size can change the layout of every single cell that comes after it. There are techniques to quickly determine size of an image without downloading the whole image (see https://github.com/malcommac/ImageSizeFetcher for some ideas). Alternatively, you could configure your server's API to provide the aspect ratio as part of your fetch request?
Hey, I tried to use the Waterfall Layout in SwiftUI with images I dont know the aspect ratio or height and so I tried to not provide a WaterfallLayoutDelegate and use the auto layout which is mentioned in the demo. But I always get an error and the app crashes... Am I missing something?